The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

tempusfugit (144) [Avatar] Offline
#1
From delegates to functions in C# (p.132)

delegate R Func<T1, T2>(T1 arg1, T2 arg2);
Func<int, int, int> add = delegate(int a, int b) { return a + b; }

should be

delegate R Func<T1, T2, R>(T1 arg1, T2 arg2);
Func<int, int, int> add = delegate(int a, int b) { return a + b; };

i.e. (1) add type parameter R to the end of type parameter list; (2) add semicolon at the end of anonymous method definition.
Tomas Petricek (160) [Avatar] Offline
#2
Re: From delegates to functions in C# (typo)
Thanks again!
I just got the chapter for the final review and nobody noticed this problem so far! I'm correcting it right now...

T.