Index
2017-05-17 18:44mbsoftwaresolutions@mbsoftwaresolutions.com: [NF] C#: Single inheritance
2017-05-17 23:06Ed Leafe : Re: [NF] C#: Single inheritance
2017-05-18 02:17Wollenhaupt, Christof : Re: [NF] C#: Single inheritance
2017-05-18 06:30mbsoftwaresolutions@mbsoftwaresolutions.com: Re: [NF] C#: Single inheritance
2017-05-18 06:33mbsoftwaresolutions@mbsoftwaresolutions.com: Re: [NF] C#: Single inheritance
2017-05-18 07:22Wollenhaupt, Christof : Re: [NF] C#: Single inheritance
2017-05-18 07:44Edward Leafe : Re: [NF] C#: Single inheritance
2017-05-18 12:00mbsoftwaresolutions@mbsoftwaresolutions.com: Re: [NF] C#: Single inheritance
2017-05-18 12:06mbsoftwaresolutions@mbsoftwaresolutions.com: Re: [NF] C#: Single inheritance
2017-05-19 00:34Ed Leafe : Re: [NF] C#: Single inheritance
Back to top
[NF] C#: Single inheritance

Author: mbsoftwaresolutions@mbsoftwaresolutions.com

Posted: 2017-05-17 18:44:01   Link

I could have swore somebody told me DotNet was MULTIPLE inheritance,

where you could have multiple parents...which I thought was really great

& cool! However, my Pluralsight training video just said it's SINGLE

inheritance.

So what language has MULTIPLE PARENT inheritance? Java?

_______________________________________________

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/17acb866557e68042859ab01fc17525c@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.

©2017 mbsoftwaresolutions@mbsoftwaresolutions.com
Back to top
Re: [NF] C#: Single inheritance

Author: Ed Leafe

Posted: 2017-05-17 23:06:39   Link

On May 17, 2017, at 6:44 PM, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:

>

> So what language has MULTIPLE PARENT inheritance? Java?

Java does. Python too.

-- Ed Leafe

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

multipart/signed

text/plain (text body -- kept)

application/pgp-signature

---

_______________________________________________

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/FC77B6CA-29F3-4FB7-BD20-F50E8F1A04BD@leafe.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 Ed Leafe
Back to top
Re: [NF] C#: Single inheritance

Author: Wollenhaupt, Christof

Posted: 2017-05-18 02:17:15   Link

>

> I could have swore somebody told me DotNet was MULTIPLE inheritance, where

> you could have multiple parents...which I thought was really great & cool!

Multiple inheritance of interfaces, but only one actual parent class...

class Class : Parent, Interface1, Interface2, Interface3 { }

I'd argue that there is a good reason not to support multiple inheritance

as that easily leads to violations of the Single Responsibility Principle.

--

Christof

--- 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/CAL4QJhjkMeLNuODkXyeQo3CHF6-w=ZpNTuM8wZeWdbN_7ksi-g@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
Back to top
Re: [NF] C#: Single inheritance

Author: mbsoftwaresolutions@mbsoftwaresolutions.com

Posted: 2017-05-18 06:30:56   Link

On 2017-05-18 03:17, Wollenhaupt, Christof wrote:

>>

>> I could have swore somebody told me DotNet was MULTIPLE inheritance,

>> where

>> you could have multiple parents...which I thought was really great &

>> cool!

>

>

> Multiple inheritance of interfaces, but only one actual parent class...

>

> class Class : Parent, Interface1, Interface2, Interface3 { }

>

> I'd argue that there is a good reason not to support multiple

> inheritance

> as that easily leads to violations of the Single Responsibility

> Principle.

>

> --

> Christof

Ah...but tell me, can you call to the parent's parent class, like VFP's

class::JumpMoreThanOneLevelUp?

You make a good point of the Single Responsibility Principle, though.

Less confusing and more consistent.

_______________________________________________

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/ff14cea4de6e30c1436395c3ab6b451c@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.

©2017 mbsoftwaresolutions@mbsoftwaresolutions.com
Back to top
Re: [NF] C#: Single inheritance

Author: mbsoftwaresolutions@mbsoftwaresolutions.com

Posted: 2017-05-18 06:33:50   Link

On 2017-05-18 00:06, Ed Leafe wrote:

> On May 17, 2017, at 6:44 PM,

> mbsoftwaresolutions@mbsoftwaresolutions.com wrote:

>>

>> So what language has MULTIPLE PARENT inheritance? Java?

>

> Java does. Python too.

Maybe it was Python learning. I did start reading a Java book but I

don't think it was that. Wherever it was, I recall reading that the

classes listed earlier (left) had dominance over those listed after, so

if both class parents had the same method (or was it property?),

whichever class was listed first (leftmost) would be the one that got

called/referenced.

_______________________________________________

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/50e731bf6a874acd7d5c28e3d3a3ff8c@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.

©2017 mbsoftwaresolutions@mbsoftwaresolutions.com
Back to top
Re: [NF] C#: Single inheritance

Author: Wollenhaupt, Christof

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

>

> 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
Back to top
Re: [NF] C#: Single inheritance

Author: Edward Leafe

Posted: 2017-05-18 07:44:21   Link

On May 18, 2017, at 6:33 AM, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:

>

> Maybe it was Python learning. I did start reading a Java book but I don't think it was that. Wherever it was, I recall reading that the classes listed earlier (left) had dominance over those listed after, so if both class parents had the same method (or was it property?), whichever class was listed first (leftmost) would be the one that got called/referenced.

Exactly. When you call a method not defined in the current class, it will look it up from the super classes in order until the method is found.

-- Ed Leafe

--- 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/75466D1F-3716-481E-84E4-8E0706D3B1E8@leafe.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 Edward Leafe
Back to top
Re: [NF] C#: Single inheritance

Author: mbsoftwaresolutions@mbsoftwaresolutions.com

Posted: 2017-05-18 12:00:54   Link

On 2017-05-18 08:44, Edward Leafe wrote:

> On May 18, 2017, at 6:33 AM,

> mbsoftwaresolutions@mbsoftwaresolutions.com wrote:

>>

>> Maybe it was Python learning. I did start reading a Java book but I

>> don't think it was that. Wherever it was, I recall reading that the

>> classes listed earlier (left) had dominance over those listed after,

>> so if both class parents had the same method (or was it property?),

>> whichever class was listed first (leftmost) would be the one that got

>> called/referenced.

>

> Exactly. When you call a method not defined in the current class, it

> will look it up from the super classes in order until the method is

> found.

In Java, Python, or both?

_______________________________________________

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/fa6b889d9e2a4b56eb000cfa45208692@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.

©2017 mbsoftwaresolutions@mbsoftwaresolutions.com
Back to top
Re: [NF] C#: Single inheritance

Author: mbsoftwaresolutions@mbsoftwaresolutions.com

Posted: 2017-05-18 12:06:23   Link

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.

©2017 mbsoftwaresolutions@mbsoftwaresolutions.com
Back to top
Re: [NF] C#: Single inheritance

Author: Ed Leafe

Posted: 2017-05-19 00:34:54   Link

> On May 18, 2017, at 10:00, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:

>

> In Java, Python, or both?

Can't speak for Java, as I haven't used it in over a decade. But yes for python.

-- Ed

_______________________________________________

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/003F73F7-BC98-4D25-BF67-6B061B16D363@leafe.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 Ed Leafe