Created
January 21, 2018 22:21
-
-
Save boekabart/98fbb8a351a289f66e58f128a1284752 to your computer and use it in GitHub Desktop.
The Conflicting Case Of ValueTuple Casing Convention
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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