public override bool Equals(Object obj)
    {
        ObjectEqualsContent cls = obj as ObjectEqualsContent;

        if (cls._value == _value &&
            cls._buffer.CompareTo(_buffer) == 0)
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }
    public void TestEqualsAndReference()
    {
        Console.WriteLine("-- TestEqualsAndReference --");
        ObjectEqualsReference robj1 = new ObjectEqualsReference(10, "hello");
        ObjectEqualsReference robj2 = new ObjectEqualsReference(10, "hello");

        // Gotcha even though the elements are equal, it returns false
        Assert.IsFalse(robj1.Equals(robj2));
        Assert.IsTrue(robj1.Equals(robj1));

        ObjectEqualsContent obj1 = new ObjectEqualsContent(10, "hello");
        ObjectEqualsContent obj2 = new ObjectEqualsContent(10, "hello");

        Assert.IsTrue(obj1.Equals(obj2));
        Assert.IsTrue(obj1.Equals(obj1));

        IList <ObjectEqualsContent> list1 = new List <ObjectEqualsContent>();

        list1.Add(obj1);
        list1.Add(obj2);

        IList <ObjectEqualsContent> list2 = new List <ObjectEqualsContent>();

        list2.Add(obj1);
        list2.Add(obj2);
        // Gotcha even though the list contains equal elements, it returns false
        //Assert.IsFalse( list1.Equals( list2));

        Devspace.Commons.Collections.ImplementedEqualsAndHashCode <ObjectEqualsContent> hlist1 =
            new Devspace.Commons.Collections.ImplementedEqualsAndHashCode <ObjectEqualsContent>(list1);
        Devspace.Commons.Collections.ImplementedEqualsAndHashCode <ObjectEqualsContent> hlist2 =
            new Devspace.Commons.Collections.ImplementedEqualsAndHashCode <ObjectEqualsContent>(list2);

        Assert.IsTrue(hlist1.Equals(hlist2));

        // Gotcha as the GetHashCode is not implemented in ObjectEqualsContent and will return unequal values
        // there should also be a warning indicating that Equals has been implemented and not GetHashCode.
        Assert.AreNotEqual(hlist1.GetHashCode(), hlist2.GetHashCode());
    }