```
class FirstClass { }
class SecondClass { }
class Program
{
    private static void Main(string[] args)
    {
       var firstClass1  = new FirstClass();
       var firstClass2  = firstClass1;
       var secondClass1 = new SecondClass();;
       var secondClass2 = secondClass1;

       object null1 = null;
       object null2 = null;

       int a = 10, b = 10, c = 20;

       Console.WriteLine("firstClass1 == firstClass2:\t"   + SameReference(firstClass1, firstClass2));
       Console.WriteLine("secondClass1 == secondClass2:\t" + SameReference(secondClass1, secondClass2));
       Console.WriteLine("firstClass1 == secondClass1:\t"  + SameReference(firstClass1, secondClass1));
       //Console.WriteLine("null1 == null2:\t" + SameReference(null1, null2));
       Console.WriteLine("null1==firstClass1:\t" + SameReference(null1, firstClass1));
       Console.WriteLine("a == b:\t" + SameReference(a, b));
       Console.ReadKey();             
    }
    public static bool SameReference(object object1,object object2)
    {
        if ((object1 == null && object2 != null) || (object1 != null && object2 == null))
            return false;
        if ((object1 == null && object2 == null) || (object1.GetHashCode() == object2.GetHashCode()))
        {
            Console.WriteLine(object1.GetHashCode() + "\t" + object2.GetHashCode());
            return true;
        }
        return false;
    }
}

```

In the above code, GetHashCode() method is returning 10 and 10 for a and b, but I want to compare addresses. That is how GetHashCode() method should work.please explain.