BorisKotlyar

Untitled

Aug 22nd, 2020
1,838
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  1.                 var tempDict = new Dictionary<Point, List<Point>>();
  2.                 foreach (var point1 in _filter)
  3.                 {
  4.                     if (!tempDict.ContainsKey(point1))
  5.                     {
  6.                         tempDict.Add(point1, new List<Point>());    
  7.                     }
  8.                    
  9.                     tempDict[point1].Add(point1);
  10.                 }
  11.                
  12.                 foreach (var kvp in tempDict)
  13.                 {
  14.                     if (kvp.Value.Count > 1)
  15.                     {
  16.                         foreach (var point1 in kvp.Value)
  17.                         {
  18.                             _filter.Remove(point1);
  19.                         }
  20.                     }
  21.                 }
Advertisement
Add Comment
Please, Sign In to add comment