[IronPython] C# code calling IP subclass weirdness

msurel at comcast.net msurel at comcast.net
Mon Nov 14 20:58:13 CET 2005


In C#, if you want somebody to be able to override a method in a base class, I think you need the virtual keyword. I believe if you define the DoSomething method in Helper with the virtual keyword, then you should be ok.

That would be about the only suggestion I have. Other than that, the code looks ok to me. In C# if you want to override a method in a base class I believe it has to be declared virtual and the method in the subclass needs to have the override keyword.

Since you don't have the equivalent of the 'override' keyword in Python, I'm not 100% sure you will be able to do this anyway.


> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

-------------- next part --------------
An embedded message was scrubbed...
From: "Michael Shilman" <shilman at microsoft.com>
Subject: [IronPython] C# code calling IP subclass weirdness
Date: Mon, 14 Nov 2005 09:02:14 +0000
Size: 33308
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20051114/5c79c058/attachment.mht>


More information about the Ironpython-users mailing list