FCL , , , #, , . .
Here is an example (just one of many) that you can find one or more lines at a time in an array of strings or apply any other criteria that, in your opinion, match this set of strings. Indentation, spacing, and code comments play a large role in understanding this code example, as with any code.
bool found = Array.Exists(
// array of strings to search
new[] { "c#", ".net", "programming", "design patterns", "work", "play", "bits", "bytes", "break" },
// criteria - can even satisfy multiple conditions simultaneously if desired
str => (str == ".NET" || str == "work") //look for ".NET" or "work"
);
source
share