= = ==
[EnumDescription( = = ==
Is a self-written class, and the source code will be pasted below.
txt = EnumDescription.GetEnumText( txt == EnumDescription.GetFieldTexts( =EnumDescription.GetFieldTexts(= =
Source code
[AttributeUsage (AttributeTargets. field | EnumDescription (enumDisplayText ,. enumDisplayText =. enumRank = EnumDescription (enumDisplayText, {() fieldIno. getValue ({================================================= ==== System. collections. hashtable cachedEnum = (EnumDescription []) enumType. getCustomAttributes (EnumDescription), (eds. length! =) Eds [GetFieldText (= (EnumDescription ed (ed. fieldIno. name = enumValue. toString () = (cachedEnum. contains (enumType. fullName) === (FieldInfo fi [] eds = fi. getCustomAttributes (EnumDescription), (eds. length! =)]). FieldIno = (descriptions. length <=) NotSupportedException (+ enumType. name + (m =; m <descriptions. length; m ++ (sortType = SortType. default) (n = m; n <descriptions. length; n ++ swap = (. compare (descriptions [m]. enumDisplayText, descriptions [n]. enumDisplayText)>) swap = (descriptions [m]. enumRank> descriptions [n]. enumRank) swap ====