예제 #1
0
 /// <summary>
 /// Converts to the name of the constant in the specified enumeration value.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="value"></param>
 /// <returns></returns>
 public static string ToName <T>(this T value)
     where T : struct, Enum
 => FastEnum.GetName(value);
예제 #2
0
 /// <summary>
 /// Returns an indication whether a constant with a specified value exists in a specified enumeration.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="value"></param>
 /// <returns></returns>
 public static bool IsDefined <T>(this T value)
     where T : struct, Enum
 => FastEnum.IsDefined(value);
예제 #3
0
 /// <summary>
 /// Converts to the member information of the constant in the specified enumeration value.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="value"></param>
 /// <returns></returns>
 public static Member <T> ToMember <T>(this T value)
     where T : struct, Enum
 => FastEnum.GetMember(value);