Deegate Function Code Example


Example 1: what are delegates and how to use them c#


public delegate void MyDelegate(string text);

Example 2: what are delegates and how to use them c#


myDelegate d1 = new myDelegate(Method1);myDelegate d2 = new myDelegate(Method2);myDelegate multicastDelegate = (myDelegate)Delegate.Combine(d1, d2);multicastDelegate.Invoke();

Comments

Popular posts from this blog

530 Valid Hostname Is Expected When Setting Up IIS 10 For Multiple Sites

C Perror Example

Converting A String To Int In Groovy