//Converted to string in the format "{Campus}-{Floor}-{Wing}-{RoomNumber}-{BedNumber}" public override string ToString() { string bed = Campus + "-"; bed += Floor.ToString() + "-"; bed += Wing + "-"; bed += RoomNumber.ToString() + "-" + BedNumber.ToString(); return(bed); }
public override int GetHashCode() { int hash = 0; string hString = Cono + Unit + RoomNumber.ToString() + Bed; foreach (char c in hString) { hash += (int)c; } return(hash); }
protected void ValidateRoomModel(out string message) { if (Capacity < 1 || !Regex.IsMatch(Capacity.ToString(), @"^\d{0,4}$")) { message = "Capacidade inválida"; } else if (RoomNumber < 1 || !Regex.IsMatch(RoomNumber.ToString(), @"^\d{0,4}$")) { message = "Número da sala inválido"; } else { message = String.Empty; } }
public override string ToString() { StringBuilder sb = new StringBuilder(100); sb.Append("Reservation: "); sb.Append("Room "); sb.Append(RoomNumber.ToString()); sb.Append(", Check-in: "); sb.Append(CheckIn.ToString("dd/MM/yyyy")); sb.Append(", Check-out: "); sb.Append(CheckOut.ToString("dd/MM/yyyy")); sb.Append(", "); sb.Append(Duration().ToString()); sb.Append(" nights."); return(sb.ToString()); }
public String FormattedRoomNumber() { return($"{RoomNumber.ToString("000")}"); }
public override string ToString() { return(RoomNumber.ToString()); }
public override string ToString() { return(",room number: " + RoomNumber.ToString()); }