Looping through an array of strings containing approximately 3 million elements
Well you can optimize FileContains very simply - stop calling Text.ToLower() on every iteration!

In fact, at that point it's really simple to rewrite. Here's the code for the original question, which didn't have the Substring part:

public static bool FileContains(string text)
{
    // Variable name changed to save my eyes from the horror.
    return lines.Contains(text.ToLower());
}


If you store the lines in a HashSet&lt;string&gt; instead of an array or a list, it will be blazingly fast.

With the Substring part, I'd create a new HashSet&lt;string&gt; with just those substrings, assuming you want to look up more than once:

HashSet&lt;string&gt; lineStarts;

...

lineStarts = new HashSet&lt;string&gt;(lines.Select(x =&gt; x.Substring(0, x.IndexOf('|'));


Then use lineStarts within FileContains.

Note that using ToLower is a fairly crude approach to case sensitivity. You should think carefully about what this needs to do in terms of culture-sensitivity etc. See the relevant MSDN page for lots more information. (Ain't culture fun?)