-
July 10th, 2008, 07:40 AM
#16
Re: Diamond Inheritance Problem - C#
Well, .NET certainly don't support multiple inheritance, but by using a wrapper class you can solve the problem:
Code:
class AllRounderWrapper : Bowler
{
class AllRounderInsider : Batsman
{
}
}
Altought it's recommended to use interfaces instead.
And besides, I can't see why what you're doing is good for. Maybe the upsidedown proccess will be useful: derive from Batsman & Bowler from a base class, as you acually already did in the code above.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|