Naming convention of parameters of value tuples #5220
-
Am I correct, that the accepted naming convention for parameters of value tuples is camelCase? If not, skip this post :P If so, then isn't that inconsistent with
I used to write them all camelCase, but now I'm more inclined to write Pascal, which makes it overall more consistent with other code, but at the same time inconsistent with other value tuples. So I'm a bit lost. Why camelCase? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
They were designed to mimic passing around a parameter list, just wrapped into a single value. Note, if you want a different making style, then fell free. It's your code, do what you feel is best. |
Beta Was this translation helpful? Give feedback.
-
This was hashed out at great length in dotnet/runtime#27939 when the BCL added their first tuple-returning API and set the precedent to pascal case. And now, for example, StyleCop defaults to the BCL precedent. |
Beta Was this translation helpful? Give feedback.
This was hashed out at great length in dotnet/runtime#27939 when the BCL added their first tuple-returning API and set the precedent to pascal case. And now, for example, StyleCop defaults to the BCL precedent.