public GateSwitch(int Id, GateSwitchStatus status, GateSwitch parent) { this.Id = Id; this.Status = status; this.Parent = parent; leftCount = 0; rightCount = 0; }
public int CompareTo(object other) { if (other == null) { return(1); } GateSwitch gate = other as GateSwitch; if (this.Id == gate.Id) { return(0); } else if (Id < gate.Id) { return(-1); } else { return(1); } }