Advanced VB.NET Programming – Delegates
In this computer science lesson, you will learn about delegates, otherwise known as type safe function pointers. A delegate is also known as a callback. Delegates can make it easier to introduce new functionality to an application, as you will see here. A good understanding of delegates is also beneficial when developing multithreaded applications and applications that include custom event handling.
You will learn what a delegate is and how to use a delegate in Visual Basic.NET. You will learn how to define a delegate object which refers to a function with parameters, how to create an instance of a delegate and how to invoke the function referred to by the delegate.
You will also learn why you might want to use a delegate. The benefits and drawbacks of programming with delegates are discussed with reference to some key design principles of object oriented programming, namely, the single responsibility principle and the open-closed principle (OCP).
To get the most out of this lesson, it will help if you are familiar with coding classes with methods and properties in VB.NET. You can find the essentials of object oriented programming with VB.NET in a separate series of videos.
Chapters:
00:00 Introduction
00:33 What is a delegate?
00:58 A simple object oriented scenario
04:24 The problem
06:02 Define the delegated functions
07:24 Define a delegate with function parameters
08:58 Define a method with a delegate parameter
10:29 Create an instance of a delegate
10:55 Call a method with a delegate
11:46 Using properties of a class
13:55 Delegate for a sub procedure
14:34 A more realistic design approach
15:58 The pros and cons of using delegates
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Advanced VB.NET Programming – Delegates», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.