C# language feature:
applies to
benefit
how to use
see also
example:
delegate void Delegate_Definition(int x); // 1) Define delegate.
class Delegate_Inference_Example
{
// 2) Declare a function with function body matching delegate signature.
void my_function(int k) { System.Console.WriteLine(k); }
public void inference_example(){
// 3) Assign function to delegate variable.
Delegate_Definition newwaydelegate = my_function;
// Note the above statement is a simpler and equivalent to the following.
Delegate_Definition oldwaydelegate = new Delegate_Definition(my_function);
}
}