I have this string array:
string[] stringArray = { \"text1\", \"text2\", \"text3\", \"text4\" }; string value = \"text3\";
I would like to
You can use Array.IndexOf() - note that it will return -1 if the element has not been found and you have to handle this case.
Array.IndexOf()
int index = Array.IndexOf(stringArray, value);