/// <summary> /// Cast TEnum to <see cref="ulong"/> /// </summary> /// <param name="enum"></param> /// <param name="defaultVal"></param> /// <typeparam name="TEnum"></typeparam> /// <returns></returns> public static ulong CastToUInt64 <TEnum>(this TEnum @enum, ulong defaultVal = default) where TEnum : struct => NumericConv.EnumToUInt64(@enum, defaultVal);