myclass? mybase?

mskeel

Well-known member
Joined
Oct 30, 2003
Messages
913
Location
Virginia, USA
What is the difference between the key words MyBase and MyClass?

The MSDN is not very easy to understand.

Thanks.
 
MyBase.MyMethod forces your class to call the first instance of MyMethod from the ancestors of the current class.

MyClass.MyMethod forces the call to use the MyMethod of the Class Definition containing the MyClass.MyMethod call inhibiting the resolution of to an override of MyMethod that may be defined in the actual class instance.


does that make sense????
 
Joe Mamma said:
MyBase.MyMethod forces your class to call the first instance of MyMethod from the ancestors of the current class.

MyClass.MyMethod forces the call to use the MyMethod of the Class Definition containing the MyClass.MyMethod call inhibiting the resolution of to an override of MyMethod that may be defined in the actual class instance.


does that make sense????

I kind of get it, but it doesnt seem to make much sense. I still dont quite understand when it would be appropriate to use MyClass. By your description, what is the difference between MyClass and Me?

Maybe a code sample for each would help?
 
Back
Top