What is an abstract modifier in C# programming language?

 Posted by Goud.Kv on 9/1/2014 | Category: C# Interview questions | Views: 1367 | Points: 40
Answer:

abstract modifier is used for either class or a method.

abstract class is a class which has no complete implementations. All the implementations are done by the derived classes who inherits the properties of that class.

abstract methods are only limited to abstract class and we cannot declare them outside. It is an empty method which has no body, no curly braces ({}) etc.
abstract class MyClass              // This is an abstract class.

{
public abstract int Function(); // This is an abstract method.
.........;
........;
}


Asked In: Spotted While Learning | Alert Moderator 

Comments or Responses

Login to post response