Skip to content

Instantly share code, notes, and snippets.

@asbjornu
Last active August 29, 2015 13:57
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 asbjornu/9369192 to your computer and use it in GitHub Desktop.
Save asbjornu/9369192 to your computer and use it in GitHub Desktop.
What would C# look like if it was case insensitive?
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