I have a list List<string> strList
where strings are added to the list throughout the program.
I want to be able to find a certain position or index of the list containing a certain string.
I've managed to check if a string that contains a certain text exists using this code:
if (strList.Exists(str => str.Contains("Chicken")))
{
Console.WriteLine("Found it");
}
But I would like to find which position in the list this string has.