delegate variables
In this chapter you will learn:
Casting delegate variables
Two delegate variables aren't equal.
using System;/*from j a v a 2s .c o m*/
delegate void Printer();
delegate void Display();
class Test
{
static void consolePrinter()
{
Console.WriteLine("hi");
}
static void Main()
{
Printer p = consolePrinter;
Display d = p;
}
}
Compile time error.
Next chapter...
What you will learn in the next chapter:
Home » C# Tutorial » delegate, lambda, event