Si potrebbe anche usare una classe statica. Sebbene, se utilizzerai sempre i valori come stringhe, potresti semplicemente rendere ogni proprietà una stringa. Un vantaggio di questo metodo è che è possibile aggiungere descrizioni per ciascun elemento che verrà visualizzato in InteliSense.
public static class DivisionStatus
{
/// <summary>
/// Some information about None
/// </summary>
public const char None = 'N';
/// <summary>
/// Some information about Active, blah blah
/// </summary>
public const char Active = 'A';
/// <summary>
/// Some information about Inactive, blah blah
/// </summary>
public const char Inactive = 'I';
/// <summary>
/// Some information about Waitlist, blah blah
/// </summary>
public const char Waitlist = 'W';
}
fonte
2016-09-23 18:29:59
OmG ... Bene che hai chiesto qui. – nawfal