Ejemplo n.º 1
0
 public static void PrintColorName(Color color) => 
     color.Match()
          .With(Color.Red).Do(x => Console.WriteLine("Red"))
          .With(Color.Green).Do(x => Console.WriteLine("Green"))
          .With(Color.Blue).Do(x => Console.WriteLine("Blue"))
          .Exec();