Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating base class with Sub New(with parameters)
Message
From
04/10/2004 16:23:27
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00947856
Message ID:
00948621
Views:
13
Viv and Danijel,

You're right that constructors are different. In the case of C#, in case you're interested, the way to do this would be something like this:
public class BBControl : System.Windows.Forms.UserControl
{
	public BBControl()
	{
		InitializeComponent();
	}
	public BBControl(string InitString):this()
	{
		this.lblDisplay.Text = InitString;
	}
}
I guess I kinda forgot about this in my initial reply, so my apologies if anyone got confused.

~~Bonnie


>Hi,
>
>>>
>Exactly what I ended up in doing. Thanks though, weird that this isn't supported as in C#.
>>>
>
>Might be wrong but I thought derived classes in C# didn't inherit base class constructors either ?
>
>Regards,
>Viv
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform