I have a List<string>
that has some items like this:
{"Pre Mdd LH", "Post Mdd LH", "Pre Mdd LL", "Post Mdd LL"}
Now I want to perform a condition that checks if an item in the list contains a specific string. something like:
IF list contains an item that contains this_string
To make it simple I want to check in one go if the list at least! contains for example an item that has Mdd LH
in it.
I mean something like:
if(myList.Contains(str => str.Contains("Mdd LH))
{
//Do stuff
}
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…