C#用for循环来遍历枚举中的每个值
string[] names = Enum.GetNames(typeof(IMSv2Extend.CreateHtmlURLEnum));
foreach (string item in names)
{
%><option value="<%=item %>"><%=item %></option><%
}
Enum.GetValues(typeof(枚举的名称));可以获得指定枚举的枚举值。
Enum.GetNames(typeof(枚举的名称));可以获得指定枚举的枚举名称。
来源:亦有软件