I have an array of string and I want to get back from it a filtered array that contains only those strings that match the searched string.
string[] myValues = {"School.Report1", "School.Report2", "School.Report3", "House.Report1", "House.Report2"};
string myFilter = "School";
string[] filteredValues = myValues.Filter(myFilter); // or something similar
filteredValues must contains only: "School.Report1", "School.Report2", "School.Report3".
-- EDIT --
I prefer a non-LINQ approach if possibile. Otherwise I know that this question can be answered with the solution proposed here: filter an array in C#.
foreachloop with the comparison inside. I want to know if there's a more elegant and concise way to do it without LINQ.School1.Report1