Advertisement
TSorbera

Untitled

Dec 10th, 2014
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.44 KB | None | 0 0
  1.     public class DirectoryEntryEqualityComparer : IEqualityComparer<DirectoryEntry>
  2.     {
  3.         public bool Equals(DirectoryEntry e1, DirectoryEntry e2)
  4.         {
  5.             return e1.Properties["distinguishedName"].Value == e2.Properties["distinguishedName"].Value;
  6.         }
  7.    
  8.         public int GetHashCode(DirectoryEntry entry)
  9.         {
  10.             return entry.Properties["distinguishedName"].Value.GetHashCode();
  11.         }
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement