Using Out Variables (C# 7.0) instead of Out Parameters
Views (957)
Out Parameters must need to declared before they are used in the method which doesn’t seem intuitive.

Now with C# 7.0 we can now make use of Out variable.

Here in our second call to the method we have used out variable named outVariableString which we didn’t have to declare like output parameter.
Hope it helps..
Filed under: .NET Framework, C# Tagged: .NET Framework, .NET Language, C#
This was originally posted here.

Like
Report
*This post is locked for comments