Search for a specific value inside a Generic list : <p>The purpose of the below code is to find a specific value within a generic list using List.Find() method . I am pasting a code below : </p>

<pre><code>class Program
{
    public static List&lt;Currency&gt; FindItClass = new List&lt;Currency&gt;();        

    public class Currency
    {
        public string Country { get; set; }
        public string Code { get; set; }
    }        

    public static void PopulateListWithClass(string country, string code)
    {
        Currency currency = new Currency();
        currency.Country = country;
        currency.Code = code;

        FindItClass.Add(currency);
    }

    static void Main(string[] args)
    {
        PopulateListWithClass("America (United States of America), Dollars", "USD");
        PopulateListWithClass("Germany, Euro", "EUR");
        PopulateListWithClass("Switzerland, Francs", "CHF");
        PopulateListWithClass("India, Rupees", "INR");
        PopulateListWithClass("United Kingdom, Pounds", "GBP");
        PopulateListWithClass("Canada, Dollars", "CAD");
        PopulateListWithClass("Pakistan, Rupees", "PKR");
        PopulateListWithClass("Turkey, New Lira", "TRY");
        PopulateListWithClass("Russia, Rubles", "RUB");
        PopulateListWithClass("United Arab Emirates, Dirhams", "AED");

        Console.Write("Enter an UPPDERCASE 3 character currency code and then enter: ");

        string searchFor = Console.ReadLine();

        Currency result = FindItClass.Find(delegate(Currency cur) { return cur.Code == searchFor; });

        Console.WriteLine();
        if (result != null)
        {
            Console.WriteLine(searchFor + " represents " + result.Country);
        }
        else
        {
            Console.WriteLine("The currency code you entered was not found.");
        }            
        Console.ReadLine();
    }
}
</code></pre>

<p>My query is why List is static , what is the purpose of using static over there.</p>

<pre><code> public static List&lt;Currency&gt; FindItClass = new List&lt;Currency&gt;();  
</code></pre>

<p>Another query is why a delegate is used over there inside the find method. </p>

<pre><code>Currency result = FindItClass.Find(delegate(Currency cur) { return cur.Code == searchFor; });
</code></pre>
