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?
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?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.