R
RubiconXing
Hi All
I am just learning C# and .NET please be patient with me I would
be very interested in how you approach the problem below:
I have a form (collects username and password information) and these
are presented as public properties. I also like this form to be
another object from a library of controls (call it ControlX) so I can
use that base functionality. (give it to a control container which
keeps a collection of them etc).
There is no multiple inheritance - so I can only inherit from the
system Form class or ControlX. ControlX does not seem to offer any
interfaces. Is it possible to inherit from ControlX and somehow
transparently imbed the form functionality in the class so that the
clase is a ControlX and is a Form? (or vice versa)
I suppose I could make a ControlX class and then have it internally
create and manage an instance of a separate Form class to display its
contents when asked. But then I'd have two separate clases maintain,
load and transfer data between. Is this really the way you would do
it? Is there a better way?
All opinions and advice gratefully received.
Cheers
-R
I am just learning C# and .NET please be patient with me I would
be very interested in how you approach the problem below:
I have a form (collects username and password information) and these
are presented as public properties. I also like this form to be
another object from a library of controls (call it ControlX) so I can
use that base functionality. (give it to a control container which
keeps a collection of them etc).
There is no multiple inheritance - so I can only inherit from the
system Form class or ControlX. ControlX does not seem to offer any
interfaces. Is it possible to inherit from ControlX and somehow
transparently imbed the form functionality in the class so that the
clase is a ControlX and is a Form? (or vice versa)
I suppose I could make a ControlX class and then have it internally
create and manage an instance of a separate Form class to display its
contents when asked. But then I'd have two separate clases maintain,
load and transfer data between. Is this really the way you would do
it? Is there a better way?
All opinions and advice gratefully received.
Cheers
-R