I have a method which recieves an array of strings from another method. This array contains several strings, for days, moviegenres etc. I need to check if the array contains any of the moviegenres, and if so I need that specific value.
here is what I have now:
if (eventsSelected.Contains("act") ||
eventsSelected.Contains("adv") ||
eventsSelected.Contains("ani") ||
eventsSelected.Contains("doc") ||
eventsSelected.Contains("dra") ||
eventsSelected.Contains("hor") ||
eventsSelected.Contains("mys") ||
eventsSelected.Contains("rom") ||
eventsSelected.Contains("sci") ||
eventsSelected.Contains("thr"))
{
//get the value that is in the array contains.
}
Because my code checks for 10 different values how can I find out which value is true?
So let's say the array contains the value "act" how can I get that specific value?