From the course: Visual Basic Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Work with extension methods - Visual Basic Tutorial
From the course: Visual Basic Essential Training
Work with extension methods
- To work with LINQ, you'll need to understand extension methods. This is not a topic we've investigated yet, but they are a crucial part of dot net, that was created specifically to build the language integrated query tools. Today we'll look at the enumerable clash shown on line 16. It contains two kinds of methods, normal methods and extension methods. Here I'm looking at the range function. It's generates a list of integers. So I'm providing the starting value and how many integers I want. So I'll get numbers from range 20 to 320. This is a simple example of a normal function. The more interesting part is that the enumerable class is filled with extension methods that help break queries against the data stored in our list instances. Look at that, in this method here. In this example, I've created two generic lists. A list of string and a list of double. Read in the comments that in Enumerable, the extension methods…
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)
-
-