|
Listing 14-22 extracted from chapter Unsafe code, exceptions, anonymous methods, iterators
Listing 14-21< > Listing 14-23
This listing can be compiled with the command line: csc.exe /target:exe Example_14_22.cs Errors: 0 Warnings: 0
Example_14_22.cs
class Program{
delegate void DelegateType<T>( T t );
static void Main() {
DelegateType<double> delegateInstance = delegate( double arg ) {
System.Console.WriteLine( "Hello arg:{0}" , arg.ToString() );
};
delegateInstance(5.5);
}
}
Copyright Patrick Smacchia 2006 2007
|