0
-An abstract method is a method that has no implementation (has no body), and it is required for the subclass to implement it. -A class must be declared abstract if it contains one or more abstract method. -Abstract classes can't be instantiated, (but its possible with a non-abstract subclass) Quick example: abstract class Person { public abstract string Description(); //No body } class Teacher : Person { public override string Description () { return "I am a teacher"; } } class MainClass { static void Main() { var person = new Person() //Error var teacher = new Teacher() //Ok } }
16th Oct 2017, 11:03 PM
Daniel de Lizaur