// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Collections.Generic; using System.Linq; namespace E { public class Program { public static void Main(string[] args) { Dictionary demo = new Dictionary(); demo.Add("A", 1); demo.Add("B", 2); demo.Add("C", 3); demo.Add("D", 2); List> demolist = demo.ToList(); for(int i = 0; i < demolist.Count; i++) { for(int j = i + 1; j < demolist.Count; j++) { if(demolist[i].Value == demolist[j].Value) { Console.WriteLine("Conflict between " + demolist[i].Key + " and " + demolist[j].Key); } } } } } }