Nested foreach loops replacement in C#

Nested foreach loops is something that I have always felt uncomfortable with. Recently I have found out more elegant and in some cases even more efficient, replacement for nested double foreach loop. Lets assume we have two lists of strings filled with some values and we want to have a collection of all combinations of elements from list l1with elements from list l2. Obvious so…

By Mirek on (tags: c#, Join, categories: code)