using System; using System.Collections.Generic; namespace Question5_Q { delegate bool IsSalaey(int S ); class Program { public static int x; static void Main() { IsSalaey Se = new IsSalaey(Chack); List<int> ListSalary = new List<int>(); ListSalary = new List<int> { 2000, 3000, 4000, 5000, 6000 }; x = 3000;// هنا يحدد المستخدم الاختيار من المصفوفة chackSalary(ListSalary, Se); } public static void chackSalary(List<int> eSalary, IsSalaey SS) { foreach (int CS in eSalary ) { if (SS(CS)) { Console.WriteLine(" ****** " + CS ); } } } public static bool Chack(int AS) { if (AS >= x) return true; else return false; } } }
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more