mainul098
9/19/2016 - 2:05 PM

Compare two objects by value in C#

Compare two objects by value in C#

private static bool CompareValue(object o1, object o2)
{
    return o1.GetType() == o2.GetType() && Object.Equals(o1, o2);
}