This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[StructLayout(LayoutKind.Sequential)] | |
public readonly struct EnumNumber<TEnum> : IEquatable<EnumNumber<TEnum>> | |
where TEnum : unmanaged, Enum | |
{ | |
private readonly TEnum _value; | |
public TEnum Value => _value; | |
public EnumNumber(TEnum value) => _value = value; | |
private static readonly int _size = Unsafe.SizeOf<TEnum>(); | |
private static readonly bool _signed = IsSignedCore(); |