GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  VB.NET
Go To First  |  Previous Question  |  Next Question 
 VB.NET  |  Question 23 of 60    Print  
i was asked in interview that if i have created a class and i don't want the class to be inherited by any other members without me which key or function i have to use?

  
Total Answers and Comments: 6 Last Update: October 01, 2008     Asked by: Ashwini 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: suhail
 

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

and notinherit keyword in vb.net



Above answer was rated as good by the following members:
Blagorodnuy, cherry2020
October 14, 2006 03:51:32   #1  
suhail        

RE: i was asked in interview that if i have created a ...

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

and notinherit keyword in vb.net


 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
February 20, 2007 13:27:37   #2  
PraveenKumar        

RE: i was asked in interview that if i have created a ...

BY using MyClass keyword.


 
Is this answer useful? Yes | No
February 28, 2007 06:12:30   #3  
raghavendran        

RE: i was asked in interview that if i have created a ...
Use Not Inheritable in class to avoid inheriting that class.
 
Is this answer useful? Yes | No
August 13, 2007 13:26:31   #4  
tfouda        

RE: i was asked in interview that if i have created a ...

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


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


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
November 19, 2007 10:43:06   #5  
hkasthuri Member Since: November 2007   Contribution: 3    

RE: i was asked in interview that if i have created a ...
Use NonInheritable class classname

 
Is this answer useful? Yes | No
October 01, 2008 01:43:36   #6  
sandyreddy Member Since: October 2008   Contribution: 2    

RE: i was asked in interview that if i have created a class and i don't want the class to be inherited by any other members without me which key or function i have to use?
By using Sealed Class it will be possible.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape