VB.NET - Define delegate. How to implement it.

Define delegate.

- When a function is passed as as parameter, it is known as a delegate
- Events such as mouseclick, keypress, ApplicationStart (in ASP.NET), etc., handle some delegate in .NET.
- We are aware of these events but VS IDE (Visual Studio Integrated Development Environment) does it for us.

A few keynotes about a Delegate

1. A delegate is declared like a normal Procedure/Method in VB.NET which accepts a parameter but doesn’t return Sub in case of a Sub method and type in case of a Function.
2. Any type of value is not returned. Technically, a Sub delegate returns a Sub pointer but for now, keep in mind, they do not return any value.
3. Delegates only have declaration, they do not have any body.
4. To use a Delegate, you need to attach some function to it. Delegates on their own do not do anything.
VB.NET - Parse method
VB.NET Parse method - Parse method is used to convert string value to numeric type......
VB.NET - kinds of multidimensional arrays
VB.NET - kinds of multidimensional arrays - Multidimensional arrays are just like a table structure with rows and column.....
VB.NET - What is encapsulation?
VB.NET - What is encapsulation? - It is the fundamental principles of object-oriented programming......
Post your comment