[Solved] Is there a way to get the index value when using …. Array.IndexOf? [closed]

[ad_1]

You should store the result of IndexOf() and use that.

var result = Array.IndexOf(myarray, myvalue);
if ( result > -1 )
    Console.WriteLine("the value existe in myarray[" + result + "]");

[ad_2]

solved Is there a way to get the index value when using …. Array.IndexOf? [closed]