Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

ÙŽQuestion5_Q

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;
        }
    }
   
   
   
}

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.