using System.Collections.Generic;
using System.ComponentModel;
public static class PartialComparer
{
public static int? Compare(T first, T second)
{
return Compare(Comparer.Default, first, second);
}
public static int? Compare(IComparer comparer,T first,T second)
{
int ret = comparer.Compare(first, second);
if (ret == 0)
{
return null;
}
return ret;
}
}