-
Notifications
You must be signed in to change notification settings - Fork 0
/
InterfaceExample.cs
98 lines (78 loc) · 1.64 KB
/
InterfaceExample.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
using System;
namespace TestApplication
{
internal interface IOne
{
void One();
void Two();
void Four();
void Six();
}
internal interface ITwo
{
void Two();
}
internal interface IThree:IOne
{
void Three();
}
internal interface IFour
{
void Four();
}
internal interface IFIve : IThree
{
void Five();
}
internal interface ISix
{
void Six();
}
internal interface IEven : ITwo,IFour,ISix
{
}
internal class OddEven : IEven, IFIve
{
public void One()
{
Console.WriteLine("this is One");
}
public void Two()
{
Console.WriteLine("this is Two");
}
public void Three()
{
Console.WriteLine("This is Three");
}
public void Four()
{
Console.WriteLine("this is Four");
}
public void Five()
{
Console.WriteLine("this is Five");
}
public void Six()
{
Console.WriteLine("this is Six");
}
}
public static class Program
{
public static void Main(string[] args)
{
Console.WriteLine("This is ODD");
IFIve obj = new OddEven();
obj.One();
obj.Three();
obj.Five();
Console.WriteLine("\n\nThis is Even");
IOne obj1 = new OddEven();
obj1.Two();
obj1.Four();
obj1.Six();
Console.ReadLine();
}
}
}