コード例 #1
0
 void On(Greeting x)
 {
     Console.WriteLine("{0}: {1} said: {2}", Self, x.From, x.Text);
 }
コード例 #2
0
 void On(Greeting x) => Console.WriteLine($"{x.From} said to {Self}: '{x.Text}'");