[IronPython] __delattr__ in .NET class
dinov at microsoft.com
Thu Dec 2 22:35:29 PST 2010
> I am currently implementing a module in C#. I need to be able to override the
> __delattr__ method for one of my objects. I've put in a __delattr__ method
> that takes a string, but it never gets called. I also tried DeleteMember
> because I saw that around too. Is there a way to do this?
Did DeleteMember have [SpecialName] attribute on it? It should work if it's got
that attribute. The ideal way to do this is to implement IDynamicMetaObjectProvider
so that it'll work from all languages (DeleteMember is more of a IronPython-ism).
More information about the Users