예제 #1
0
        /// <summary>获取枚举的自定义值
        /// </summary>
        /// <param name="emValue"></param>
        /// <returns></returns>
        public static object Get_AttrValue(this Enum emValue)
        {
            EnumAttr pEnumAttr = GetAttr <EnumAttr>(emValue);

            return(pEnumAttr == null ? null : pEnumAttr.AttrValue);
        }
예제 #2
0
        /// <summary>获取枚举的自定义名称
        /// </summary>
        /// <param name="emValue"></param>
        /// <returns></returns>
        public static string Get_AttrName(this Enum emValue)
        {
            EnumAttr pEnumAttr = GetAttr <EnumAttr>(emValue);

            return(pEnumAttr == null ? null : pEnumAttr.AttrName);
        }