Пример #1
0
 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));
 }
Пример #2
0
        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));
        }