/// <summary> /// Converts the value of the specified enumeration to an unsigned short. /// </summary> /// <typeparam name="T">An enumeration type</typeparam> /// <param name="value">An enumeration value</param> /// <returns>A 16-bit unsigned integer that is cast equivalent to the enumeration value</returns> public static ushort ToUInt16 <T>(T value) where T : struct, E => EnumCompiledCache <T> .ToUInt16(value);