示例#1
0
        static void Main(string[] args)
        {
            IsSuperstar isSuperstar = new IsSuperstar(isSuperStar);

            List <ManUnited> squad = GenerateList();

            ManUnited.SuperStar(squad, x => x.Attribute > 84);
            Console.ReadLine();
        }
示例#2
0
 public static void SuperStar(List <ManUnited> muPlayers, IsSuperstar isSuperstar)
 {
     foreach (ManUnited muPlayer in muPlayers)
     {
         if (isSuperstar(muPlayer))
         {
             Console.WriteLine(muPlayer.Name + " is a superstar");
         }
     }
 }