Inheritance: IColor
Example #1
0
 static void Main(string[] args)
 {
     var red = new Red();
        var green = new Green();
     Console.WriteLine(red.ToString());
     Console.WriteLine(green.ToString());
       //  Console.WriteLine(red.GetMyType());
        // ColorsProcessor.Process(red, green);
 }
Example #2
0
 public static void Do(Green first, Red second)
 {
     //Green, Green
     GreenRed = true; //just for tests
 }
Example #3
0
 public static void Do(Red first, Green second)
 {
     //Red, Green
     RedGreen = true; //just for tests
 }
Example #4
0
 public string Prosess(Green first, Green second)
 {
     return first.ColorGreen + " " + second.ColorGreen;
 }
Example #5
0
 public string Prosess(Blue first, Green second)
 {
     return first.ColorBlue + " " + second.ColorGreen;
 }
Example #6
0
 public void Process(Green colorOne, Red colorTwo)
 {
     LastProcess = TypeOfProcess.GreenAndRed;
 }
Example #7
0
 public void Process(Green colorOne, Green colorTwo)
 {
     LastProcess = TypeOfProcess.GreenAndGreen;
 }
Example #8
0
 public void Process(Red colorOne, Green colorTwo)
 {
     LastProcess = TypeOfProcess.RedAndGreen;
 }
Example #9
0
 public static void Do(Red first, Green second)
 {
     //Red, Green
     RedGreen = true; //just for tests
 }
Example #10
0
 public static void Do(Green first, Red second)
 {
     //Green, Green
     GreenRed = true; //just for tests
 }
Example #11
0
 public void Process(Green colorOne, Red colorTwo)
 {
     LastProcess = TypeOfProcess.GreenAndRed;
 }
Example #12
0
 public void Process(Red colorOne, Green colorTwo)
 {
     LastProcess = TypeOfProcess.RedAndGreen;
 }
Example #13
0
 public void Process(Green colorOne, Green colorTwo)
 {
     LastProcess = TypeOfProcess.GreenAndGreen;
 }
Example #14
0
 public string Prosess(Green first, Green second)
 {
     return(first.ColorGreen + " " + second.ColorGreen);
 }
Example #15
0
 public string Prosess(Blue first, Green second)
 {
     return(first.ColorBlue + " " + second.ColorGreen);
 }