Balajiprasad's useful codes
Important codings & concepts in web & window applications using microsoft technologies.
Friday, June 1, 2012
LINQ Contains(string[]) instead of Contains(string)
string
input =
"aaa1236"
;
string
[] toSearchFor =
new
string
[3] {
"aaa"
,
"bbb"
,
"ccc"
};
var
containsAll = toSearchFor.Any(x => input.Contains(x));
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)