Something that has bugged me for a while, is what way is best to perform a conditional where a string is compared to other strings.  Here is some sample code.  This code is just for illustration purposes.The 3 methods I use areDo a word for word comparison.  This is probably the most optimal, but ugliest codeCreate an array on the fly and do a comparisonHave a predefined array.  This is probably better placed in an external file for easier maintainability.I just wanted to see what your takes are on this, and if there is an even better way to do it.  I know Enums would probably work well here as well.    private bool IsWordBad(string word)    {        //First Method        if (word == Foo || word == Bar || word == FooBar)        {            return true;        }        //Second Method        if ((new[] { Foo, Bar, FooBar }).Contains(word))        {            return true;        }        //Third Method        var badWords = new[] { Foo, Bar, FooBar };        if (badWords.Contains(word))        {            return true;        }        return false;    } 
What's the most optimal way to see if a string is included in a list of strings?
c#;.net