Skip to content

Instantly share code, notes, and snippets.

@komainu85
Created February 18, 2015 21:11
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save komainu85/d2a44151ed246e5bc137 to your computer and use it in GitHub Desktop.
Save komainu85/d2a44151ed246e5bc137 to your computer and use it in GitHub Desktop.
Sitecore Item Comparer
public class ItemComparer : IEqualityComparer<Item>
{
public bool Equals(Item x, Item y)
{
return x.ID == y.ID;
}
public int GetHashCode(Item obj)
{
return obj.ID.GetHashCode();
}
}
@mlhaufe
Copy link

mlhaufe commented Mar 3, 2016

Thanks. Why this isn't native, one can only guess. I wonder if they use their own APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment