General information
Category:
Object Oriented Programming
I think is has to do with C# being strongly typed. I am sure a virtual method is handled differently than a normal method. In C# you can also specify a method MUST be overridden too.
As to WHY does the language have this, I would say, because that's how it is designed. As you say VFP's OOP implementation is different than C#, but that doesn't make either 'wrong'.
>C# has an Override keyword. Its job is to indentify that the method being redefined in the sub-class exists as a Virtual method in a super class (base class). Virtual is another keyword in C#. In essense, is a Virtual method analogous to a C++ Virtual method which declares functionality without the implementation?
>
>If this is so, the difference in C# is that it enables implementation in the Virtual method. Therefore, the only purpose of the C# Virtual method is to tell C# that the sub class should use the Override method and not the Virtual method.
>
>In VFP, there is no need of declaration. The method can be directly over ridden by implementing the method in the sub class (Override). Then, if we need the base methods (Virtual) functionality then we call DoDefault(). The C# process seems verbose.
>
>Is this methodology used so that documentation of Super-Sub Class relationships are easier for Visio or Designer to uncover?
>
>
>Navneet
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only