Beaware !! The Answer marked might have some problem , like
string array[] = {"hello", "hi", "bye" , "welcome" , "hell"}
if you use the same method as described in the answer to find the index of word "hell"
Int Indexofary = Array.FindIndex(array, t => t.IndexOf("hell", StringComparison.InvariantCultureIgnoreCase) >=0);
you will get result Indexofary = 0 instead of 4.
Instead of that use
Array.FindIndex(array, t => t.Equals("hell", StringComparison.InvariantCultureIgnoreCase));
to get proper result .
Rrgards
Bits
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…