/// <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);
/// <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);
/// <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);