.NET 2
string[] myStrings = GetMyStrings(); string test = \"testValue\";
How can I verify if myStrings contains test
myStrings
test
I have found an elegant answer at the page here http://www.dotnettoad.com/index.php?/archives/10-Array.Contains.html. What you have to do in .NET 2.0 is to cast to IList and call Contains method.
(IList mystrings).Contains(test);