c# - loop through an array and find partial string -
If I have an array
array [0] = "jack"; Array [1] = "jill"; Array [2] = "Lisa"; Array [2] = "jackie";
And I want to find all the elements of "ack" in it.
In this case it will come back
"Jack", "Jackie"
What is the fastest way to do this?
array. Where (s = & gt; s.Contains ("ack"));
(Gladly ignoring any localization / string collation / case sensitivity issues.)
Comments
Post a Comment