/// <summary> /// Converts enum value into primitive type <see cref="short"/>. /// </summary> /// <typeparam name="T">Type of the enum value to be converted.</typeparam> /// <param name="value">Enum value to be converted.</param> /// <returns>Enum value represented as <see cref="short"/>.</returns> public static short ToInt16 <T>(this T value) where T : struct, Enum => ValueTypeExtensions.ToInt16(value);
/// <summary> /// Converts enum value into primitive type <see cref="long"/>. /// </summary> /// <typeparam name="T">Type of the enum value to be converted.</typeparam> /// <param name="value">Enum value to be converted.</param> /// <returns>Enum value represented as <see cref="long"/>.</returns> public static long ToInt64 <T>(this T value) where T : struct, Enum => ValueTypeExtensions.ToInt64(value);
/// <summary> /// Converts enum value into primitive type <see cref="int"/>. /// </summary> /// <typeparam name="T">Type of the enum value to be converted.</typeparam> /// <param name="value">Enum value to be converted.</param> /// <returns>Enum value represented as <see cref="int"/>.</returns> public static int ToInt32 <T>(this T value) where T : struct, Enum => ValueTypeExtensions.ToInt32(value);
public static sbyte ToSByte <T>(this T value) where T : struct, Enum => ValueTypeExtensions.ToSByte(value);