Ejemplo n.º 1
0
 /// <summary>
 /// Converts enum value into primitive type <see cref="byte"/>.
 /// </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="byte"/>.</returns>
 public static byte ToByte <T>(this T value) where T : struct, Enum => ValueTypeExtensions.ToByte(value);