Author: mbsoftwaresolutions@mbsoftwaresolutions.com
Posted: 2017-05-18 at 12:06:23
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?
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/3c5a5100281b1b18f196e4ae9b423865@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.