From the course: Visual Basic Essential Training
Unlock this course with a free trial
Join today to access over 24,500 courses taught by industry experts.
Delegates and lambda expressions - Visual Basic Tutorial
From the course: Visual Basic Essential Training
Delegates and lambda expressions
- [Instructor] Delegates and Lambda expressions are essential for understanding how to use LINQ queries, because they provide the tools needed to pass methods as parameters and define inline functionality. LINQk relies heavily on these concepts to perform operations such as filtering, sorting, and extracting data. In addition to their role in LINQ, Delegates and Lambda expressions are also valuable when working with many methods and generic collections and other parts of .NET. Passing functions as arguments is useful in programming because that allows for greater flexibility, modularity, and reusability in code. Here are some of the reasons why this is valuable. Passing a function let us encapsulate specific behavior or logic and pass it to other parts of the program. This way we can define what should be done without hard coding the exact behavior. Functions passed as arguments are commonly used for callbacks where one function is executed after another one has finished. This is…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Explore the collection classes10m 18s
-
(Locked)
Use a ListBox instead of a text control3m 10s
-
(Locked)
Create new collections6m 30s
-
(Locked)
Initialize a collection2m 23s
-
(Locked)
Add items to a list1m 13s
-
(Locked)
Get items from the list3m 16s
-
(Locked)
Remove items from a list1m 15s
-
(Locked)
Iterate over a list5m 20s
-
(Locked)
Bind a list to a user control5m 46s
-
(Locked)
Delegates and lambda expressions4m 36s
-
(Locked)
Customize a method with predicate functions5m 21s
-
(Locked)
Quick look at other collection classes4m 28s
-
(Locked)
-
-
-