Topic Author
Posts: 11
Joined: 24 Jan 2015, 20:29

Feature Request: Seal non-inheritable classes

05 Feb 2015, 04:45

I don't know about you, but I much prefer to get a compiler error than have to dig through documentation to find out that I wasn't supposed to do something. Plus, the main way that I learn a library is just by monkeying around with it.
With that in mind, it'd be nice if the classes which I'm not supposed to inherit threw a compiler error when I tried to inherit them. You can do this either with the "sealed" keyword (if the class in question has no inheritors in your assembly) or by following this series of posts by Eric Lippert ... t-one.aspx ... t-two.aspx

I think this should be done even when support for inheritance of a class is planned for a later date.

On that note, can I inherit Noesis.Panel?
User avatar
Site Admin
Posts: 3205
Joined: 20 Jan 2012, 17:18

Re: Feature Request: Seal non-inheritable classes

06 Feb 2015, 20:31

Most of noesisGUI classes are inheritable. You can see the hierarchy in the Class Hierarchy List.

So, yes, you can derive from Panel, as Grid, StacPanel, WrapPanel,.. do but the problem is that right now many methods that are virtual in base classes are not properly exposed from c++ to c#. That it the reason we recommend using User Controls instead of Custom Controls.

Who is online

Users browsing this forum: Google [Bot] and 1 guest