static dictionary does not get filled
<p>this is the working code:</p>

<pre><code>    static class Global
    {
        private static Dictionary&lt;string, int&gt; emails_compsIDs;
        private static Dictionary&lt;string, int&gt; set_emails_compsIDs { set { emails_compsIDs = value; } }
        private static DataTable MultiCompReport;

    static Global()
    {
        string e = string.Empty;
        Dictionary&lt;string, int&gt; emails_compsIDs = new Dictionary&lt;string, int&gt;();
        DataTable t = MySql.ExecuteSelect("SELECT Email, Company_ID FROM potencial_contact WHERE Email != '' AND Email IS NOT NULL");

        foreach (DataRow r in t.Rows)
        {
            int comp_id = Convert.ToInt32(r["Company_ID"]);
            e = r["Email"].ToString().Replace("\r", "").Replace("\t", "").Replace("\n", "").Trim().ToLower().Trim();
            if (!string.IsNullOrWhiteSpace(e) &amp;&amp; !emails_compsIDs.ContainsKey(e))
            {
                try
                {
                    emails_compsIDs.Add(e, comp_id);
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
        }
        if (emails_compsIDs.ContainsKey("linda@andatrade.com"))
            Console.WriteLine("Eureka");
        set_emails_compsIDs = emails_compsIDs;
    }
}
</code></pre>

<p>but when i did just <code>emails_compsIDs = new Dictionary&lt;string, int&gt;();</code>
in order to initialize the dictionay in the constructor the code only filled the 1st row into it.
by creating an instance indise the ctor and then putting the result in my static dictionay it filled all the rows.</p>
