not inheriting control from base class
-
Can anyone tell me how I can have a control tht I don't want other classes to inherit? I have a base class and the child class needs to inherit but I don't want it to inherit one of the comboboxes. I need to delete it. I tried to go into the designer class and declare protected but it still inherits. Thank you Sianny aka Sharny
-
Can anyone tell me how I can have a control tht I don't want other classes to inherit? I have a base class and the child class needs to inherit but I don't want it to inherit one of the comboboxes. I need to delete it. I tried to go into the designer class and declare protected but it still inherits. Thank you Sianny aka Sharny
Hi, Make it as a sealed class. :)
-
Can anyone tell me how I can have a control tht I don't want other classes to inherit? I have a base class and the child class needs to inherit but I don't want it to inherit one of the comboboxes. I need to delete it. I tried to go into the designer class and declare protected but it still inherits. Thank you Sianny aka Sharny
i suppose use non abstract class but not sure
-
i suppose use non abstract class but not sure
No. A non abstract class is just a class that can be instantiated. The answer to this is to make the class sealed so that it cannot be inherited from.
public sealed class CannotBeInherited { }
Deja View - the feeling that you've seen this post before.