string array.Contains?

前端 未结 10 1433
无人及你
无人及你 2021-02-07 03:22

.NET 2

string[] myStrings = GetMyStrings();    
string test = \"testValue\";

How can I verify if myStrings contains test

10条回答
  •  -上瘾入骨i
    2021-02-07 03:55

    Here is almost the exact same question on msdn. Find String in String Array As others have said you really have two options: 1) Use a list for easier checking 2) Loop through your array to find the string

提交回复
热议问题