Last active
August 29, 2015 13:57
-
-
Save asbjornu/9369192 to your computer and use it in GitHub Desktop.
What would C# look like if it was case insensitive?
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
namespace CaseInsensitive | |
{ | |
public class Test | |
{ | |
private readonly string name; | |
public Test(string name) | |
{ | |
this.name = name; | |
} | |
public string Name | |
{ | |
get { return this.name.ToUpperInvariant(); } | |
} | |
public override string ToString() | |
{ | |
return this.name; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment