The main question:
Ok guys, this is the situation, let's consider 2 string arrays:
string foo = { "Roses are #FF0000" , "Violets are #0000FF", "Paint it #000000"}
string bar = { "Guns", "Roses", "Violets"}
What is the "smallest code string" way to fetch strings in foo containing strings in a string?
(i.e., in this case, the first 2 elements of foo)
Of course, I want to avoid executing all the logic “manually”, since I am sure that Linq is more efficient with the intersection function, but I do not know how to use it to perform this exact task.
TieBreakers:
1 - What to do if foo contains lines containing more than one panel element,
string foo = { "Roses are #FF0000" , "Violets are #0000FF", "Paint it #000000"}
string bar = { "Roses", "Violets", "are"}
And I want to avoid duplicates?
2 - , 2 "bar" , foo?
bar1 bar2 bar1, bar2?
Thanx : -)