コード例 #1
0
 public ClassB(SerializationInfo info, StreamingContext context)
 {
     Name     = info.GetString("Name");
     LastName = info.GetString("LastName");
     Age      = info.GetInt32("Age");
     Height   = info.GetDouble("Height");
     C        = (ClassC)info.GetValue("ClassC", typeof(ClassC));
 }
コード例 #2
0
 public override bool Equals(object obj)
 {
     if ((obj == null) || !this.GetType().Equals(obj.GetType()))
     {
         return(false);
     }
     else
     {
         ClassC i = (ClassC)obj;
         return(this.Name.Equals(i.Name) && this.LastName.Equals(i.LastName) &&
                this.Age.Equals(i.Age) && this.Height.Equals(i.Height));;
     }
 }