Performance issue with DictionaryEntry looping
<p>Currently I have 231556 of words collection and do below loop to check every words for duplication.</p>

<p>I am using this function :-</p>

<pre><code>public bool IsContainStringCIAI(string wordIn, HybridDictionary hd, out string wordOut)
    {
        int iValue = 1;
        foreach (DictionaryEntry de2 in hd)
        {
            iValue = CultureInfo.CurrentCulture.CompareInfo.Compare(wordIn.ToLower(), de2.Key.ToString().ToLower(), CompareOptions.IgnoreNonSpace);
            if (iValue == 0)
            {
                wordOut = de2.Key.ToString(); //Assign the existing word
                return true;
            }
        }
        wordOut = wordIn;
        return false;
    }
</code></pre>

<p>It take around 20 hours to finish looping, because each word will be added in to dictionary after comparing if it is not same. Anything can I do to improve this loop? Thanks before.</p>
