Below linq query gives two entries of the same items in nd. Looking for a way to remove the reversed entry.
//unit = new List<string>{"F1","F2","F3","F4","F5","F6","F7","F8","F9"}
//v["F3"]="12" v["F6"]="12"
var nd = (from n1 in unit
from n2 in unit
where n1 != n2 && v[n1].Length == 2 && v[n1] == v[n2]
select new {n1,n2}).ToList();
The values in nd is given as below. How can i avoid the 2nd entry?
Count = 2
[0]: { n1 = "F3", n2 = "F6" }
[1]: { n1 = "F6", n2 = "F3" }