public class Student
{
public string Name { get; set; }
public int ID { get; set; }
}
...
var st1 = new Student
{
ID =
If comparing public members is enough for your use-case, simply jam your objects into JSON and compare the resulting strings:
var js = new JavaScriptSerializer();
Assert.AreEqual(js.Serialize(st1), js.Serialize(st2));
JavaScriptSerializer Class
Pros
EqualsCons