public static ValuePairList valuePairList(string[] range) { ValuePairList list = new ValuePairList(); list.pair_list = valuePair(range); return(list); }
/// <summary> /// 获取枚举类型的所有 显示名称(name)-项目名称(value) 集合 /// </summary> /// <typeparam name="TEnum">枚举类型</typeparam> /// <returns></returns> public static ValuePairList allValuePair <TEnum>() { var list = new ValuePairList(); try { var names = allNames <TEnum>(); for (var i = 0; i < names.Length; i++) { var display = getDisplay <TEnum>(names[i]); list.set(display, names[i]); } } catch { } return(list); }