GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Microsoft  >  C#
Go To First  |  Previous Question  |  Next Question 
 C#  |  Question 400 of 431    Print  
Abstract classes and virtual methods
Abstract classes can be overridden by virtual methods (true, false)


  
Total Answers and Comments: 3 Last Update: July 01, 2008     Asked by: Raj_Kumar12 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: whirlpool
 
When an abstract class inherits a virtual method from a base class, the abstract class can override the virtual method with an abstract method.

Answer is True.



Above answer was rated as good by the following members:
mahmood pasha
December 03, 2007 13:09:14   #1  
SoCalBruce Member Since: December 2007   Contribution: 2    

RE: Abstract classes and virtual methods
An abstract class can ONLY be overridden by a virtual method.  If the method is not virtual then the abstract method is "hidden".

 

The "override" also means the member is virtual.  For example, Derived.Method is a virtual method:

 
public abstract class Base
{
    public abstract void Method ( );
}
 
public class Derived : Base
{
    public override void Method ( )
    {
    }
}

 
Is this answer useful? Yes | No
December 26, 2007 11:25:33   #2  
whirlpool Member Since: December 2007   Contribution: 3    

RE: Abstract classes and virtual methods
When an abstract class inherits a virtual method from a base class, the abstract class can override the virtual method with an abstract method.

Answer is True.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
July 01, 2008 07:30:58   #3  
mahmood pasha Member Since: June 2008   Contribution: 5    

RE: Abstract classes and virtual methods
It is designed to act as derived class. the class , which contain more virtual function is called an abstract class. and it cannot be create as an object, and it is similar to Interface
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape