public Class2(SerializationInfo info, StreamingContext context) { num = info.GetSingle("num"); date = info.GetDateTime("date").ToLocalTime(); name = info.GetString("name"); obj = (Class3)info.GetValue("obj", typeof(Class3)); }
public override bool Equals(object obj) { Class3 @class = obj as Class3; return(@class != null && num == @class.num && date == @class.date && name == @class.name && EqualityComparer <Class1> .Default.Equals(this.obj, @class.obj)); }