public Order(int id, Client client, Skates skates) { if (id < 0) { throw new ArgumentOutOfRangeException("Id is not correct!"); } this.id = id; Client = client; Skates = skates; }
public Order(SerializationInfo info, StreamingContext content) { this.id = (int)info.GetValue("Id", typeof(int)); this.client = (Client)info.GetValue("Client", typeof(Client)); this.skates = (Skates)info.GetValue("Skates", typeof(Skates)); }