I want to know the best way to compare two objects and to find out if they\'re equal. I\'m overriding both GethashCode and Equals. So a basic class looks like:
You could serialise the two objects to JSON, then compare the two strings to see if they are the same.
For example
JavaSriptSerializer serialiser = new JavaScriptSerializer();
string t1String = serialiser.Serialize(t);
string t2String = serialiser.Serialize(t2);
if(t1String == t2String)
return true; //they are equal
else
return false;