New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of Equals
C#
/// <summary>
/// Implements a projection strategy that select an "identity" property from an object 
/// and uses the default comparer to implement IEqualityComparer<typeparamref name="T"/>
/// </summary>
/// <typeparam name="T">Type of object to extract identity from</typeparam>
/// <typeparam name="TRet">Type of the extracted identity value</typeparam>
public class IdentityProjectionEqualityComparer<T, TRet> : IEqualityComparer<T> where TRet : IComparable<TRet>
{
    private readonly Func<T, TRet> _projector;
    private readonly IEqualityComparer<TRet> _comparer;
by Marc Brooks   May 18, 2010 @ 2:26pm
175 Views
2 comments
 
brought to you by:
West Wind Techologies


If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate