Пример #1
0
        public RoyalGazetteList FindDuplicates()
        {
            RoyalGazetteList lResult = new RoyalGazetteList();
            RoyalGazetteList lTemp   = new RoyalGazetteList();

            lTemp.AddRange(this);
            URIComparer lComparer = new URIComparer();

            lTemp.Sort(lComparer.Compare);
            int lIndex = 0;

            while (lIndex < lTemp.Count)
            {
                RoyalGazette lEntry = lTemp[lIndex];
                lTemp.RemoveAt(lIndex);
                int lFound = lTemp.BinarySearch(lEntry, lComparer);
                if (lFound >= 0)
                {
                    lResult.Add(lEntry);
                }
            }
            return(lResult);
        }