Horje
how to create a delegate in c# Code Example
how to create a delegate in c#
//the delegate can point to a void function and takes a string parameter
delegate void Del(string str);

public void hello(string Name)
{
 	Console.WriteLine("hello " + Name) ;
}
public static void main()
{
  //you need to declare the delegate type above and give it a function
  //that matches the delegate's funcion 
  Del HelloDelegate = new Del(hello);
  HelloDelegate("IC");
}
/// (output) -> "hello IC"




Csharp

Related
c# bool Code Example c# bool Code Example
c# append array Code Example c# append array Code Example
sleep in C# Code Example sleep in C# Code Example
how to get the hour on c# Code Example how to get the hour on c# Code Example
c# remove item from list Code Example c# remove item from list Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10