Skip to content

Instantly share code, notes, and snippets.

@boekabart
Created January 21, 2018 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boekabart/98fbb8a351a289f66e58f128a1284752 to your computer and use it in GitHub Desktop.
Save boekabart/98fbb8a351a289f66e58f128a1284752 to your computer and use it in GitHub Desktop.
The Conflicting Case Of ValueTuple Casing Convention
public static class SomeXmlExtensions
{
/* Intentionally mixed up the two possible styles */
public (string name, string Value) FirstCustomProperty(this XElement element)
{
// See how up there, it looks like it should be like name, not like Value
var theName = ...;
var theValue = ...'
return (theName, theValue);
}
}
public class SomeOtherClass
{
public void Flennen(XElement bar)
{
var customProp = bar.FirstCustomProperty();
Console.Writeline($"Somehow, it looks unnatural to write {customProp.name}, {customProp.Value} feels better");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment