Interviews2 answers
Is it possible to have abstract class without abstract method in C#?
2 Answers
Yes
mahesh sorathiyaPosted Sep 13, 2022, 4:45 AM EDT
Yes it is possible.
Ex:
abstract class MyClass
{
public void Disp()
{
Console.WriteLine("Hello");
}
}
class Program : MyClass
{
static void Main(string[] args)
{
Program p = new Program();
p.Disp();
Console.ReadLine();
}
}
Rajesh SinghPosted Aug 29, 2016, 3:00 AM EDT
