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. .
ValueTuple is a structure introduced in C# 7.0 which represents the value type Tuple. It is already included in . NET Framework 4.7 or higher version. It allows you to store a data set which contains multiple values that may or may not be related to each other.
Constants should be written in uppercase characters separated by underscores. Constant names may also contain digits if appropriate, but not as the first character.
Look at tuple as bags of variables and, as such, the convention is to use camel case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With