I have a string list and i want all permutations of all elements with each others
Example :
var myList = new List<string>{ "AB", "CD", "EF", "GK" };
and as result i want a string like this.
var resultStr = "ABCD,ABEF,ABGK,CDAB,CDEF,CDGK,EFAB,EFCD,EFGK,GKAB,GKCD,GKEF";
note that resultStr doesnt include "ABAB","CDCD","EFEF","GKGK"
is there any short way to do this except double for/foreach loops?