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

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -