I have a keyword Person
. I have a list that has elements inside such as Person A
,Apple
, Person B
,Pear
, Person C
,Banana
I am trying to get the elements in the list that contains the keyword .
for(int i =0; i < list.items.count; i++){
if (keyword == list[i])
Console.WriteLine("Person")
}
Im trying the code above and it does not seem to work. Can anyone help?