From the course: .NET Essentials: Working with LINQ

Unlock this course with a free trial

Join today to access over 22,500 courses taught by industry experts.

Learn how to use the Query Expression syntax

Learn how to use the Query Expression syntax - .NET Tutorial

From the course: .NET Essentials: Working with LINQ

Learn how to use the Query Expression syntax

- [Instructor] What we're looking at, in this video is something called a QueryExpression. So here's a simple example of a QueryExpression from n and numbers select n. You often see these kinds of examples when you're looking at introductory examples for Link. And the reason is this syntax looks very similar to a Syntax in another popular Query Language. I'm talking about Structured Query Language or SQL. So this looks similar to this, and it's important to understand that whether you write code like this, or whether you write code or focus on the last video where you're using colors.where or you're using the Static method, Syntex like this, it doesn't matter which of these three methods you choose. They're all going to call these Query Operators that are a part of the Innumerable class, though, what we're talking about happening here is the C Sharp compiler knows how to turn this syntax into calls to a innumarable.ehare and…

Contents