ValueTuple naming conventions

Viewed 5035

When naming a ValueTuple element, should they be capitalized or not?

(string Name, int Index) rec;

or

(string name, int index) rec;

EDIT:

It seems the convention is PascalCase

See: https://github.com/dotnet/runtime/issues/27939#issuecomment-531420515

EDIT 2

I chose to always use camelCase. I see 'ValueTuple' as just a bag of values used almost exclusively for returning multiple values from functions. I never use ValueTuple' as a state and always prefer records for that. .

1 Answers

Look at tuple as bags of variables and, as such, the convention is to use camel case.

Related