59
// Solution 3 : Segregate interface into logical units this should how we design our application in the beginning,
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
ConcreteClass C = new ConcreteClass();
8
9
C.DoSomethingElse3();
10
11
}
12
public interface Iinterface
13
{
14
void DoSomething();
15
void DoSomethingElse();
16
void DoSomethingElse1();
17
//customer dont want to implemnet below ones
18
void DoSomethingElse2();
19
void DoSomethingElse3();
20
}
21
22
//Solution 1 : create an abstract class
23
public abstract class MyClass: Iinterface
24
{
Cached Result