Re: [NF] C#: Single inheritance

Author: Wollenhaupt, Christof

Posted: 2017-05-18 at 07:22:07

>

> 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.

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

_______________________________________________

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/CAL4QJhjsbh4RMEi689RCZWuDAHp_UWAGR7TxA5dyjAQ0ssQy+Q@mail.gmail.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.

©2017 Wollenhaupt, Christof