Exemplo n.º 1
0
 /// <summary>
 /// 获取枚举值包含的位域值
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="e"></param>
 /// <returns></returns>
 public static IEnumerable <T> GetFlagEnums <T>(this Enum e) where T : struct
 {
     return(e.GetFlagEnums().Cast <T>());
 }