Prevent Inheritance a class

Posted by Mani654mani under C# on 4/19/2012 | Points: 10 | Views : 1607 | Status : [Member] | Replies : 3
Hi,

How to prevent Inheritance a class without using sealed Keyword?




Responses

Posted by: Dotnetrajanikanth on: 4/20/2012 [Member] Starter | Points: 25

Up
0
Down
http://msdn.microsoft.com/en-us/library/ms173150.aspx

If you are using vb.net use NotInheritable key word

____________
www.flickr.com/photos/psdesigner/

Mani654mani, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sunny4989 on: 4/20/2012 [Member] Starter | Points: 25

Up
0
Down
Only sealed is the best possible way

------------------------------------------------
Learn throughout life

Mani654mani, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Savariya on: 4/20/2012 [Member] Starter | Points: 25

Up
0
Down
Make that class static so that you can Prevent inheritance

Mani654mani, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response