Overload constructor for UserControl

bpayne111

Junior Contributor
Joined
Feb 28, 2003
Messages
325
Location
BFE
I'm having some trouble with an app and one way of solving my problem would be overloading the constructor of my user control or a windows form. I have a feeling neither of these is possible am i correct?

brandon
 
Overloading a form's constructor is perfectly fine.
Overloading a usercontrol's constructor can be done but the design time creation of controls only uses the default constructor - you will either have to manually create the control in code or go in and edit the designer generated code to use the overloaded constructor.
 
how do you do this in c#? i tried doing it the normal way i'd overload a method and it didn't seem to work.
when i declared a new form using my overloaded constructor it gave me a "No constuctor accepts this number of arguments" error" or something to that nature. I rebuilt my project too, to be sure that it would find it.
Am i missing something here?

thanks
brandon
 
Back
Top