[IronPython] Using Python special methods in C#
fuzzyman at voidspace.org.uk
Sun Jul 13 19:21:17 CEST 2008
Dan Eloff wrote:
> 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.
This example from Srivatsn shows you how:
> Users mailing list
> Users at lists.ironpython.com
More information about the Ironpython-users