المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Virtual methods and reduntant XmlDoc



C# Programming
10-31-2009, 11:21 AM
Hi,

I was wondering if anyone knows if there is a way of avoiding duplication of documentation when using virtual methods and polymorphy.

If we use virtual methods properly they are overridden to do something in a different way, not to do something else, in a logical sense. Hence, the doc for an override should be the same as for the method it overrides.

Is there any way to avoid having to copy the doc to all the base classes? Obviously the doc should be pretty stable in a perfect world, but then again the world is often imperfect and it's a pain to maintain consistency this way...


Btw, I apologize if the C# forum isn't the approriate one for my question. XmlDoc is a C# feature, even if VB.NET and maybe other CLS-compliant ********s provide something similar nowadays, so I didn't know where else it might go. Please say so if you feel there's another forum that would be more appropriate.