-
-
Save joerodgers/2ea0af289c7e4710fdf8af4a9194caeb to your computer and use it in GitHub Desktop.
C# enum for US States
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
using System.ComponentModel; | |
namespace StateAbbreviations | |
{ | |
public enum States | |
{ | |
[Description("Alabama")] | |
AL, | |
[Description("Alaska")] | |
AK, | |
[Description("Arkansas")] | |
AR, | |
[Description("Arizona")] | |
AZ, | |
[Description("California")] | |
CA, | |
[Description("Colorado")] | |
CO, | |
[Description("Connecticut")] | |
CT, | |
[Description("D.C.")] | |
DC, | |
[Description("Delaware")] | |
DE, | |
[Description("Florida")] | |
FL, | |
[Description("Georgia")] | |
GA, | |
[Description("Hawaii")] | |
HI, | |
[Description("Iowa")] | |
IA, | |
[Description("Idaho")] | |
ID, | |
[Description("Illinois")] | |
IL, | |
[Description("Indiana")] | |
IN, | |
[Description("Kansas")] | |
KS, | |
[Description("Kentucky")] | |
KY, | |
[Description("Louisiana")] | |
LA, | |
[Description("Massachusetts")] | |
MA, | |
[Description("Maryland")] | |
MD, | |
[Description("Maine")] | |
ME, | |
[Description("Michigan")] | |
MI, | |
[Description("Minnesota")] | |
MN, | |
[Description("Missouri")] | |
MO, | |
[Description("Mississippi")] | |
MS, | |
[Description("Montana")] | |
MT, | |
[Description("North Carolina")] | |
NC, | |
[Description("North Dakota")] | |
ND, | |
[Description("Nebraska")] | |
NE, | |
[Description("New Hampshire")] | |
NH, | |
[Description("New Jersey")] | |
NJ, | |
[Description("New Mexico")] | |
NM, | |
[Description("Nevada")] | |
NV, | |
[Description("New York")] | |
NY, | |
[Description("Oklahoma")] | |
OK, | |
[Description("Ohio")] | |
OH, | |
[Description("Oregon")] | |
OR, | |
[Description("Pennsylvania")] | |
PA, | |
[Description("Rhode Island")] | |
RI, | |
[Description("South Carolina")] | |
SC, | |
[Description("South Dakota")] | |
SD, | |
[Description("Tennessee")] | |
TN, | |
[Description("Texas")] | |
TX, | |
[Description("Utah")] | |
UT, | |
[Description("Virginia")] | |
VA, | |
[Description("Vermont")] | |
VT, | |
[Description("Washington")] | |
WA, | |
[Description("Wisconsin")] | |
WI, | |
[Description("West Virginia")] | |
WV, | |
[Description("Wyoming")] | |
WY | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment