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.
Interesting list properties - Visual Basic Tutorial
From the course: Visual Basic Essential Training
Interesting list properties
- [Instructor] And at this point, we've looked at the basics of the generic list class. In this video, we'll look at some of its interesting methods that can simplify everyday tasks. We'll start by looking in the number generator module. I've been using this throughout the course, and I have these methods like get random odd number and get random even number, and all of them return a single integer. That means that if you want 15 random odd numbers, you have to write a four loop and call my method 15 times. I can make your life better or more interesting or easier by creating a method in my module that returns a list of integers or a list of string or a list of doubles, and that's what I've done at the bottom of this module right here in line 44. A declare to function called get odd numbers list that returns a list of integer. You tell me how many numbers you want with a list count, I'll generate a list of integers…
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)
-
-