In my C # code, I have a class that stores some data that I want to pass to my python code in List. However, when I try to access the properties of this class inside my python code, I get a MissingMemberException . Here is a sample code to show what I mean:
FROM#:
class Event { public int EventId { get; set; } public string EventName { get; set; } }
eventParser.py:
for e in events: print e.EventId, " / ", e.EventName
MissingMemberException says: "The event does not contain a member named EventId"
I tested passing other types to python, including lists of primitive types like List< int > and List< string > , and they work fine.
So how do I access these class properties, EventId and EventName in my python script?
c # ironpython
peacemaker
source share