示例#1
0
 //extension method - a method of a static class which can be invoked
 //as an instance method of its this qualified first parameter type
 public static void ApplyAll(this IConsumer that, int actions)
 {
     for (int i = 1; i <= actions; ++i)
     {
         that.Apply(i);
     }
 }