C#中枚举的遍历

C#中枚举的遍历
foreach(SupportedStereotype st in
               (SupportedStereotype[])System.Enum.GetValues(typeof(SupportedStereotype)))
{
       //do something
}

//Return an indication whether a constant with a specified value exists in a specified enumeration
bool System.Enum.IsDefined(typeof(SupportedStereotype),stereotype);


你可能感兴趣的:(C#中枚举的遍历)