Link to home
Start Free TrialLog in
Avatar of Ashok9
Ashok9Flag for India

asked on

Extending two classes in c#

I have two classes A, B

class A
{
    member of A;
}

class B
{
    member of B;
}


I want a class of type B.
But I need the members of A also in that class.
But in c# we cant extend Both A and  B classes.
Is there any way to Get Class A members in my new class.?

other wise i have to duplicate the members and functions of Class A.

Please help me....
ASKER CERTIFIED SOLUTION
Avatar of Jarrod
Jarrod
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ashok9

ASKER

Here the big trouble I am facing is I cant touch both the classes A and B.  Sorry I forgot to mention.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ashok9

ASKER

Those two classes A, B are the framework classes which I am using. I am not supposed to touch any of them.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ashok9

ASKER

Its our internal framework. Both are controls basically.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ashok9

ASKER

Yes. I can create any number of classes. But In my new class how do I inherit both of them?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ashok9

ASKER

Unexpectedly I cant. because they are not abstract.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ashok9

ASKER

Thanks for your help