On 2017-05-18 08:22, Wollenhaupt, Christof wrote:
Ah...but tell me, can you call to the parent's parent class, like VFP's class::JumpMoreThanOneLevelUp?
If you are not talking about a virtual method, you can use
(this as GreatGrandParent).Method();
when Method is either protected internal, internal or public. For a virtual method you cannot skip a level using the base keyword, nor can you for protected methods.
Why would you need, though?
Keep in mind, that in .NET protection and overriding is done at the class level, whereas in VFP it's at the object level. That means, in VFP you can't access protected members of another instance, in C# you can. In VFP you can nest objects through inheritance and composition (containership) which you can't in .NET.
Can you elaborate on the last part, about nesting objects through inheritance and composition?