Skip to content

Instantly share code, notes, and snippets.

@serdarb
Created December 3, 2011 09:29
Show Gist options
  • Save serdarb/1426667 to your computer and use it in GitHub Desktop.
Save serdarb/1426667 to your computer and use it in GitHub Desktop.
public sealed class Gender
public sealed class Gender
{
private readonly char _value;
public static readonly Gender Male = new Gender('M'); //Male
public static readonly Gender Female = new Gender('F'); //Female
public static readonly Gender Unisex = new Gender('U'); //Unisex
public static readonly Gender Other = new Gender('O'); //Other
private Gender(char v)
{
_value = v;
}
public override string ToString()
{
return _value.ToString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment