I am new to Linq and Delegates and all that an I have following issue:
I tried this:
Func<int> f = () => { return 123; };
Delegate t = f;
Visual Studio shows no errors but then I try this:
Delegate d = () => return 123;
It's not working
Then I tried this:
Action a = delegate { Console.Out.WriteLine("test"); };
Delegate x = a;
It works, but
Delegate j = delegate { Console.Out.WriteLine("test"); };
Directly casting seems not to work. Why?
Can somebody explain me please the differences between Delegate (first cap letter) and delegate (all small letters) and Func<>
and Action
?