reinforced/Reinforced.Typings

EnumGenerator no support for uint64 / ulong

motmot80 opened this issue · 1 comments

Using for example an enumeration like

[Flags]
public enum MyEnum : ulong

basically works.

But if you really use an ulong value

Any = ulong.MaxValue,

an exception "value to large" occurs.

I think changing this to ToUInt64() and changing the type to ulong could solve this:

EnumValue = Convert.ToInt64(v).ToString()

You can't use .ToUInt64() because things like -1 (a typical Flags.All value instead of ulong.MaxValue) is out-of-range and throws an exception on the C# side.