Do you control the class of which the objects are instances? If so, you can override Equals and == so that a == b returns what you want. E.g, a trivial example
class Test {
int a; double b;
public static operator bool == (Test a, Test b) { return (object)a == null ? (object)b == null : a.Equals(b); }
public static operator bool != (Test a, Test b) { return !(a == null); }
public override bool Equals(object o){
if(o is Test){
Test test = (Test)o;
return a == test.a && b == test.b;
} else return base.Equals(o);
}
public override int GetHashCode(){ return a.GetHashCode() ^ b.GetHashCode(); }
}
If not, and you don't know in advance what type the objects will be, you'll need to use reflection, make a sorted list of their fields/properties/etc (whatever you count as 'structure') and compare those.