loop through an array and find partial string
arrays, c#, string
Solution
array.Where(s => s.Contains("ack"));
(Cheerfully ignoring any localisation / string collation / case sensitivity issues.)
Problem
if i have array array[0] = "jack"; array[1] = "jill"; array[2] = "lisa"; array[2] = "jackie"; and i want to find all elements with "ack" in it. in this case it would return "jack", "jackie". what is the fastest way of doing this?