How to test for an array membership?

I want to test for an array membership, thats what I tried so far : http://pastie.org/1002419

This question actually made me go and look it up in order to see if there were better ways to do it than I thought, and behold - there are:

Apparently in .NET 2.0 System.Array implements an interface used in List so you can cast to the matching generic List and then do .Contains(thing); Like:

int[] myIntArray = new int[3] {0, 5, 9};

if( ( (IList)myIntArray).Contains(0) ){ Debug.Log("Found 0 in myIntArray"); }

Read more here: http://www.dotnettoad.com/index.php?/archives/10-Array.Contains.html

for (n=0;n<myArray.length;n++)
{
    if (myArray[n] == whatIneed)
    {
        print("exists");
        break;
    }            
}

Another way to do it is described in this post here:

http://answers.unity3d.com/questions/11916/compare-contents-of-arrays/11922#11922