If I have a object like:
public class Person
{
public int id {get;set;}
public string name {get;set;}
}
And I want the behavior:
Person a = new Person();
Person b = new Person();
a == b;
and that a == b returns true, do I have to override the Object.Equals() method? or is there some other way of doing it without overriding the Equals method?
EDIT
I want to compare data, as I want to know if a external method that I call returns a new object or a object with different data than a new object