ÎļþÃû´Ó WinFrmUI/Yw.WinFrmUI.Hydro.L2d.Core/Extensions/EnumExtension.cs ÐÞ¸Ä |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.Linq; |
| | | using System.Text; |
| | | |
| | | namespace Eventech.DynPicture.Model |
| | | namespace Yw.WinFrmUI.HydroL2d |
| | | { |
| | | /// <summary> |
| | | /// æä¸¾æå±ç±» |
| | | /// </summary> |
| | | public static class EnumExtension |
| | | internal static class EnumExtension |
| | | { |
| | | /// <summary> |
| | | /// è·åæä¸¾çæ¾ç¤ºå¼ |
| | |
| | | var objs = t_type.GetField(fieldName).GetCustomAttributes(typeof(DisplayAttribute), false); |
| | | return objs.Length > 0 ? ((DisplayAttribute)objs[0]).Name : null; |
| | | } |
| | | |
| | | } |
| | | } |