枚举

建立

View Code
 1 public enum 基本费率类型
 2 
 3         {
 4 
 5             光缆运杂费,
 6 
 7             电缆运杂费,
 8 
 9             塑料运杂费,
10 
11             木材运杂费,
12 
13             水泥运杂费,
14 
15             其他运杂费,
16 
17         };

遍历

View Code
1 foreach (string s in Enum.GetNames(typeof(Global.特殊费率类型))){}
原文地址:https://www.cnblogs.com/wanghafan/p/2487728.html