示例#1
0
 private static void CountSomeBeans(IBeanCounter beanCounter)
 {
     foreach (var boxOfBeans in BoxesOfBeans)
     {
         Console.Out.WriteLine(
             "There are {0} beans in the box.",
             beanCounter.Count(boxOfBeans));
     }
 }
示例#2
0
 private static void CountSomeBeans(IBeanCounter beanCounter)
 {
     foreach (var boxOfBeans in BoxesOfBeans)
       {
     Console.Out.WriteLine(
       "There are {0} beans in the box.",
       beanCounter.Count(boxOfBeans));
       }
 }