-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabstract.cs
36 lines (30 loc) · 839 Bytes
/
abstract.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
namespace Abstract
{
/// <summary>
/// ABSTRACT CLASS HAS TO PROVIDE IMPLEMEMNTATION FOR ALL THE MEMBERS INHERITED FROM THE BAASE CLASS
/// IF IT DOESNT PROVIDE IMPLEMENTATION FOR ALL THE ABSTARCT MEMBERS IT HAS TO BE DECLARED ABSTRACT AS WELL
/// ABSTARCT CLASSES CANNOT BE SEALED
/// IT CAN CONTAIN ABSTRACT MEMBERS BUT NOT MANDATORY
/// </summary>
public abstract class Customer
{
public abstract void Print();
public void Print1()
{
Console.WriteLine("Print");
}
}
class Program : Customer
{
static void Main(string[] args)
{
Customer c = new Program();
c.Print();
}
public override void Print()
{
Console.WriteLine("Print Method");
}
}
}