When any method is declared as abstract then it is necessary to declare the class as abstract.
True or False ?

 Posted by Akiii on 5/30/2012 | Category: C# Interview questions | Views: 1461 | Points: 40
Answer:

True.

If any method is declared as abstract then it is necessary to declare the class as abstract also otherwise there will be an compile time error.

For example :
public abstract class clsbase

{
public abstract int subs(int num1, int num2);
}


Try removing the abstract keyword before the class. You will get an error !


Thanks and Regards
Akiii


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response