I believe there should be a duplicate question, but I just can't find it, so apologies if it is a duplicate.
I've got an array of items, and I would like to test the existence of another string. Now to test that I know I can use:
if (stringArray.Any(myItem.Contains))
But that does not seem to work with substrings. Is there a way to test for substrings without the use of a for-loop?
string[] stringArray = {"string1Item", "string2Item", "string3Item" };
//Test if "1" appears in array
if (stringArray.Any("1".Contains)) //returns false