there are 2 control A and B

  • Thread starter Thread starter somequestion
  • Start date Start date
S

somequestion

보낸 사람: "somequestion" <[email protected]>
제목: userControl and WindowForm
ë‚ ì§œ: 2007ë…„ 4ì›” 5ì¼ ëª©ìš”ì¼ ì˜¤í›„ 11:31

now ...there are 2 control A and B
A is Form control and B is UserControl

A : Form
{}

B: UserControl
{}

i'd like to make inherit both userControl Form

C : A
{}

C : B
{}

is it possible ? if it not possible,could you tell me another way?
 
You can't do this. .NET only allows for single-inheritance, meaning,
you can only derive from a single base class.

What you are trying to do doesn't make sense anyways. Why not just
place all of your UI on a UserControl and then have an instance of that user
control in a Form?
 
As Nicholas said, you can only inherit from a single class, but you can inherit multiple interfaces. Not sure what you expect to happen if you inherit from both a Form and a UserControl, but look into interfaces, they may give you what you need.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top