Back to course

LINQ: Introduction to Language Integrated Query

C# Zero to Hero: Comprehensive Programming Masterclass

What is LINQ?

LINQ provides a uniform way to query data from different sources (Lists, XML, Databases).

Query Syntax

csharp int[] numbers = {1, 2, 3, 4, 5, 6};

var evenNumbers = from n in numbers where n % 2 == 0 select n;

It makes your code much cleaner and more readable when dealing with data sets.