What is the convention for naming tuple properties?
(string Person, int Age)
or
(string person, int age)
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
That's a good question @weitzhandler
I don't know that we've addressed his in our own codebases. @jaredpar Is there an accepted practice for tuple member names and casing?
@terrajobst is driving the decision here. Not sure it's final final but the outcome is going to be that tuple names should be cased the same way you case property names.
Thanks @jaredpar
tuple names should be cased the same way you case property names.
@terrajobst If you're comfortably with that guidance, I'll add this issue to our "up for grabs" queue for community contributions.
tuple names should be cased the same way you case property names
I'd vote for that to. Public members should be pascal cased. Would be nice to update this too.
Thanks folks. I've added this to the backlog, and added the "up for grabs" label.
Actually not that simple.
Local variables might have different behavior. If you're going to make an official documentation about it, it should have clear rules.
For instance:
```c#
int x = 5, y = 10;
var t = (x, y);
x = t.x;
y = t.y;
```
The decision that we landed on is indeed PascalCase.
@BillWagner I went through the referenced doc and it appears all of the associated samples are in line with this naming convention guidance as far as I can tell.
Is there anywhere explicitly that you'd like this guidance added additionally? If not, this can likely be closed at this point.
Thanks @SeanKilleen
I'll close this.
Is there anywhere explicitly that you'd like this guidance added additionally? If not, this can likely be closed at this point.
Most helpful comment
The decision that we landed on is indeed PascalCase.