コード例 #1
0
        public static string GetMemberName <T>(object member)
        {
            Type   underlyingType = GetUnderlyingType(typeof(T));
            object obj2           = ConvertFun.ConvertTo(member, underlyingType);

            return(Enum.GetName(typeof(T), obj2));
        }
コード例 #2
0
        public static object GetMemberValue <T>(string memberName)
        {
            Type underlyingType = GetUnderlyingType(typeof(T));

            return(ConvertFun.ConvertTo(GetInstance <T>(memberName), underlyingType));
        }