Hello!
I have a little suggestion for C# language.
Let us have delegate like this:
delegate T Parse<T>(string text);
and we want to create an instance:
Parse<int> parse = text => Int32.Parse(text);
All is OK. What about ref/out parameters in a delegate?
delegate bool TryParse<T>(string text, out T result);
when we want to create an instance…
TryParse<int> parse1 = (string text, out int result) => Int32.TryParse(text, out result);
…we shoud to specify types on parameters.
Why is this required? What about a syntax below:
TryParse<int> parse2 = (text, out result) => Int32.TryParse(text, out result);
?