public class Mouse() { public void Squeak() { } } List<Mouse> mice = new List<Mouse>(); mice.Add(new Mouse()); mice.Add(new Mouse());
你如何称呼每只鼠标的方法吱吱声?
mice.???(m => m.Squeak());
mice.ForEach(m => m.Squeak());
PS:你的问题答案有多么有趣:
How do you call the method Squeak for each mouse?