My Two versions of the following declarations work fine.
1) Func<int,int,int> findMax=Max;
Console.WriteLine("Max={0}",findMax(10,20));
2)Func<int,int,int> findMax=new Func<int,int,int>(Max);
Console.WriteLine("Max={0}",findMax(10,20));
where
public static T Max<T>(T a, T b) where T:IComparable
{
if (a.CompareTo(b) > 0) return a;
else return b;
}
In listing 2 , i instantiated the delegates,but in listing 1 i did not.How does the code work fine for listing 1 without instance creation of Func delegate?