Add Birthday
What is Abstract Class in c#
3 replies to this topic
Gaurav Dutt
#1
|
Member
62
Points
|
Posted on
22 Nov 2011 04:30 PM IST
Hi,
I want to know about impletation and role of abstract class in c#.
Thanks.
|
Dot Net
1076
views
Reply to this topic
|
MalliKarjuna Cherukuri
#2
|
Member
52
Points
|
Replied on
24 Nov 2011 07:18 AM IST
Abstract class is a class which contains at least one abstract method.
Abstract methods contain only declaration not definition for the method.
We have to use "abstract" key word to declare a method or class as abstract.
If any other classes inherit this abstract class they must define the abstract methods which are declared in the parent abstract class.
|
Reply to this topic
|
Gaurav Dutt
#3
|
Member
62
Points
|
Replied on
25 Nov 2011 06:47 AM IST
hi,
i read it. it's good. can you please give me any example for abstract class.
Thanks,
|
Reply to this topic
|
MalliKarjuna Cherukuri
#4
|
Member
52
Points
|
Replied on
29 Nov 2011 06:13 AM IST
abstract class Test
{
public int a;
public abstract void TestMethod();
}
class Example1 : Test
{
public override void TestMethod()
{
Code;
}
}
|
Reply to this topic
|
|
|