How to put an Enum into a List, using PythonNET and C#.NET?
问题 I have a NET library I'm using from Python with PythonNET and can't figure out how to put an enum into a List. It seems Python converts the enum to an integer that won't fit the List datatype. Here's an example: import clr from System.Collections.Generic import List from System import Array, Enum import MyLibrary enum = List[MyLibrary.ResultType] #no errors here enum.Add(MyLibrary.ResultType.PV) #TypeError: No method matches given arguments #and just typing MyLibrary.ResultType.PV I get this