Before I ask my question, please take a look at this example function:
DateTime.TryParse('01/01/2000', out oDate)
Why do I need to specify the out keyword? Shouldn’t the compiler know this from the function’s definition?
I’m asking this out of pure curiosity in the hope that I will learn something new about the compiler.
I should also clarify that I’m asking about the C# .NET 3.5 compiler in particular.
The out keyword could be implied by the compiler but my understanding is that the C# team decided to make the
outkeyword explicitly required by the caller of the function to increase visibility as to the nature of the parameter.