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.
Quick look at other collection classes - Visual Basic Tutorial
From the course: Visual Basic Essential Training
Quick look at other collection classes
- [Instructor] We've spent most of this chapter looking at the generic list class. .NET is full of other interesting collection classes that are optimized for other collection scenarios. We'll look at the sorted set and the cube class. I've declared an instance of each at the top of the window class. By declaring it here, they are accessible on all the button handlers. On line six I'm declaring a sorted set that will include doubles. In the first button handler, I fill that sorted set with these number values. And you'll notice they're not in sorted order. On the other button click handler, I generate a random number between one and 10, then I round that to two decimal places and then I add that to the sorted set. So this will allow us to see what happens when new items are added to the set. We'll start with the first five. Now they are arranged in the correct sorted order. We'll add a new item, and I see that that…
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)
-
-