[IronPython] Using Python special methods in C#

Dan Eloff dan.eloff at gmail.com
Sun Jul 13 19:14:18 CEST 2008

Something I've found a little difficult in C# is python special
methods. It seems sometimes you can just declare them on the C# class,
(__repr__?) and they will work, other times you need to implement an
interface (__call__?) is there any place this is documented?

I'm a little confused about how to add special methods on C# classes.

I want to add __getattr__ to a C# class (actually a subclass of
PythonDictionary), and I have no idea how.


More information about the Ironpython-users mailing list