C# Beginner to advanced - Lesson 29 - Delegates
72 بار بازدید -
6 سال پیش
-
Delegates:
A delegate is an
Delegates:
A delegate is an object that can refer to a method.
The method can be called through this reference(delegate).
Same delegate can be used to call different methods during the runtime.
The method that will be invoked by a delegate is not determined at compile time, but rather at runtime.
The method invoking at runtime is the principal advantage of a delegate.
We can use delegates with static methods and instance methods.
delegate ret-type name(parameter-list);
Once created, a delegate instance
6 سال پیش
در تاریخ 1397/03/11 منتشر شده
است.
72
بـار بازدید شده