yourenum 需要遍历的枚举
private void _enum_foreach()
{
foreach (yourenum r in Enum.GetValues(typeof(yourenum)))
{
FieldInfo f = r.GetType().GetField(r.ToString());
DescriptionAttribute arr = System.Attribute.GetCustomAttribute(f, typeof(DescriptionAttribute)) as DescriptionAttribute;
int _value = (int)r;
string _key = r.ToString();
string _name = arr.Description;
Response.Write(string.Format("{0}:{1}____{2}<br />", _value, _key, _name));
}
}