Resolved Question
i was asked in interview that if i have created a class and i dont want the class to be inherited by any other members without me which key or function i have to use?
 
Details:
  asked by: miss_chocolates  on: Aug 16, 2009  
 Best Answer ! ! !
hayata1972 's Answer  ( this answer is maked as best answer of this question at: Aug 29, 2009 )


the class which u dont want to restrict to inherit in c# , declare with sealed keyword

and notinherit keyword in vb.net



2 comments  answered on: Aug 23, 2009 
Other Answer (6)

the class which u dont want to restrict to inherit in c# declare with sealed keyword

and notinherit keyword in vb.net

  starfishie   answered on£ºAug 17, 2009  0 comments

BY using MyClass keyword.

  luzverde   answered on£ºAug 19, 2009  0 comments

Use Not Inheritable in class to avoid inheriting that class.
  hotgamermum   answered on£ºAug 21, 2009  0 comments

VB: for class NotInheritable [MyClass]
For method: NotOverridable [MyMethod]


C# For class or method :sealed[MyClassMyMethod]{}

  ryun0suk3   answered on£ºAug 22, 2009  0 comments

Use NonInheritable class classname
  ladiida   answered on£ºAug 24, 2009  5 comments

By using Sealed Class it will be possible.
  tengyong   answered on£ºAug 26, 2009  0 comments

Hot Questions

Contact Us - IT-Interview