xxxxxxxxxx
string[] array = { "cat", "dog", "perl" };
First Approach
var index = Array.FindIndex(array, x => x == value);
Second Approach
bool a = Array.Exists(array, element => element == "perl");
bool c = Array.Exists(array, element => element.StartsWith("d"));
bool d = Array.Exists(array, element => element.StartsWith("x"));
Linq Approach
array.Contains("cat");
Fourth Approach
int index = array.IndexOf(value);
xxxxxxxxxx
using System.Linq; //Then you can use linq Contains() method
string[] printer = {"jupiter", "neptune", "pangea", "mercury", "sonic"};
if(printer.Contains("jupiter"))
{Console.WriteLine("'jupiter' is in the array");}