Delegates in C sharp Arabic #35

 Delegates in C sharp Arabic #35

Suggested Videos


❑ The basics of delegates .



What is a delegate

❑ A delegate is a type safe function pointer . That is, it holds a reference ( Pointer ) to a function .

❑ The signature of the delegate must match the signature of the function , the delegate points to , otherwise you get a  compiler error .This is the reason  delegate are called as type safe function pointers . 
❑ A Delegate is similar to a class .You can create  an instance of it , and when you do so , you pass in the function name as a parameter to the delegate constructor , and it is to this function the delegate will point to .
❑ Tip to remember delegate syntax : Delegates syntax look very much similar to a method with a delegate keyword . 


Delegate example




Follow Us

YouTube

 If you want to download pptx : click Telegram

Facebook

Twitter

Instagram

Tik Tok





إرسال تعليق

أحدث أقدم