C# Inheritance - I need some help.

foozball3000

Executive Member
Joined
Oct 28, 2008
Messages
5,928
Reaction score
1,738
Location
Kyalami
I need to add some new properties to an existing control from the SDK we work with.

The idea was just to inherit the original control (OldForm), but most of the methods from the SDK returns OldForm, and I can't just cast OldForm into NewForm. (OldForm = App.CreateNewForm(); )

*working in Visual Studio 2010, .Net 4.0*
 
Override the methods you want to return the new form in your inheriting class...
 
I'd write a wrapper, overriding the appropriate methods as Raithlin suggested. A quick Google should point you in the right direction, though to be honest, it's not very difficult.
 
Top
Sign up to the MyBroadband newsletter
X