Replies: 8 comments
-
Won't that conflict with the potential declaration syntax in non-out parameters Because the keyword |
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
Even if this is possible what it actually buys? I actually find the former more readable. |
Beta Was this translation helpful? Give feedback.
-
I don't like the idea of |
Beta Was this translation helpful? Give feedback.
-
You don't want people reading the code to have to sit there and think about whether the parameter is going in or out. Ambiguity is a time sink. Similarly, the team wishes they had required an |
Beta Was this translation helpful? Give feedback.
-
Do you have any references for this? |
Beta Was this translation helpful? Give feedback.
-
It's come up a couple of times on CodePlex and GitHub Roslyn repos. Here's one such comment by a language team member:
It's true that |
Beta Was this translation helpful? Give feedback.
-
@HaloFour Thanks- saved me from searching dotnet/roslyn for a very similar quote. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When using the new "out" syntax in C#7
queryString.TryGetValue("colorA", out var AColor)
Could in this case the out removed and just leave
queryString.TryGetValue("colorA", var AColor)
as the out should already be implicit there?
Beta Was this translation helpful? Give feedback.
All reactions