My requirement is to compare the values in string with the list of string.
Code:
string Names = "Prabha,Karan";
List<string> Presenter = new List<string> { "Prabha", "Joe", "Hukm" };
bool Presented = Presenter.Contains(Names.Split(','));
the above code throws an error and here i need to find the names are presented in the presenter(Presenter has the splited values of the Names).
you could do it like below:
EDIT:
If you’re interested what are the matches just do: