我一直在寻找它,但似乎在任何地方都找不到。有谁能够帮助我?我需要使用它,但Mac的Visual Studio中不存在它,所以它会很有帮助。
你是这个意思吗?
string [] aBunchOfWords = new string[] {
"hey", "check", "out", "this", "bunch", "of", "words"
};
int whereMyWordIs = Array.IndexOf(aBunchOfWords, "this");
Console.WriteLine(whereMyWordIs);