Is there a built in way to do this or do i have to write my own loop? I have tried the code below:
int index = Array.IndexOf(options, ind => ind.Contains("COM"));
But it gives the following error: can not convert lambda to type object. This code runs but always returns -1:
int index = Array.IndexOf(options, options.Where(ind => ind.Contains("COM")));
Any help is welcome, thanks