I\'m interfacing with a .NET API in IronPython. The API is returning an object of the wrong type (some kind of generic object). I suspect that the problem is not showing up
If you need to cast numeric value to an enum use the following, because the code above does not work for enums, but only for reference types:
enum
Enum.ToObject(CustomEnumType, value)