linear search c#
static int LineSearch(int[] numbers, int num)
{
for (int i = 0; i < numbers.Length; i++)
{
if (numbers[i] == num)
{
return i;
}
}
return -1;
}