Support comparison between C# enum with `int`
Closed this issue · 2 comments
To support comparison between C# enum with int
, the wrapper Enum class should be the subclass of IntEnum
. But for now, it is hard to fetch int
value from C# enum
member.
Fortunately, the next release of pythonnet will enable int(enum.member)
to get value from enum
. We'll be able to support this feature after bumping pythonnet to 3.0.0.
Related issue
If its helpful to discretely define at as int
or to provide specific int
values to enum
in the main library, let me know.
It is just a problem only when someone wants to use Enum as int
. No functional disturbance there. So no needs to do something in C#. Thanks.
+) I can't expect what happens to wrapper for enum
without explicit int
value like CandlePart
, MaType
. If they have implicitly assigned int
value, it won't be the problem.