From the course: Visual Basic Essential Training
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Use LINQ with lists - Visual Basic Tutorial
From the course: Visual Basic Essential Training
Use LINQ with lists
Link is a deep topic, one that deserves a longer look. We have time to explore one small aspect of Link, how to work with the link extension. To do that I'll work with this list of integers. All of these values that I used in the initializer, and what I want to do is use Link to calculate the total, the average and I'll show you how to string together multiple extension methods. So, we'll start with the total. I'll use the equal sign and then the list of integers, then I'll hit the dot operator. And filter down to the extension methods, this is the one we're looking for, sum, here's the details about what this sum of it does. Computes the sum of sequence of integer values. I'll do the same thing for average, and then finally we'll string together multiple extension methods. Look at this one it's called take, returns a specified number of continuous elements from the start of the sequence. So, I want to take the first four…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Explore the collection classes5m 44s
-
(Locked)
Create new collections4m 49s
-
(Locked)
Add, remove, and interact with items from list8m 37s
-
(Locked)
Iterate over list5m 39s
-
(Locked)
Interesting list properties4m 42s
-
(Locked)
Work with extension methods2m 40s
-
(Locked)
Use LINQ with lists5m 14s
-
(Locked)
Quick look at other collection classes2m 19s
-
(Locked)
Challenge: Marble draw with lists3m 32s
-
(Locked)
Solution: Marble draw with lists4m 41s
-
(Locked)
-
-