From the course: .NET Essentials: Working with LINQ
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Examples of three query expressions - .NET Tutorial
From the course: .NET Essentials: Working with LINQ
Examples of three query expressions
- [Tutor] Earlier in this chapter, I had this principle or review of these principles where I said, query expressions can be categorized into three areas. What we'll look at in this video is concrete examples of those three areas. So the first area was take an incoming sequence and return a new sequence containing the same element type. Let's see what that means. On line nine I have my data source, which is a list of string. I'm storing it in a variable is of type IEnumerable of string and that's one of the first principles I want to talk about. It's not the container of the sequence that's important. It's the of T part of the sequence is important. So this is of type string and this is a type string and that means they're containing the same element type. So we start out here with this source and then here I'm creating my potential query and notice I'm using select. So that's going to select out a IEnumerable string.…
Contents
-
-
-
-
-
-
-
-
The three types of query expressions2m 16s
-
(Locked)
Review query expression clauses4m 45s
-
(Locked)
Examples of three query expressions3m 16s
-
(Locked)
The select clause6m 26s
-
(Locked)
Learn how to use select to project into another type2m 41s
-
(Locked)
Select into anonymous type2m 16s
-
(Locked)
Learn how to use expressions with select2m 15s
-
(Locked)
Challenge: Write select expressions1m 28s
-
(Locked)
Solution: Write select expressions1m 27s
-
(Locked)
Index into another sequence2m 58s
-
-
-
-
-
-
-
-
-
-