public void DisplaySite(int numOfDays) { Console.Write(Site_Number.ToString().PadRight(12)); Console.Write(Max_occupancy.ToString().PadRight(12)); Console.Write((Accessibile ? "Yes" : "No").ToString().PadRight(15)); if (Max_rv_length == 0) { Console.Write("N/A".PadRight(18)); } else { Console.Write(Max_rv_length.ToString().PadRight(18)); } Console.Write((Utilities ? "Yes" : "No").ToString().PadRight(12)); Console.WriteLine("$" + (Daily_Fee * numOfDays).ToString() + ".00".PadRight(12)); }
public override string ToString() { return($"{Site_id.ToString().PadRight(10)} {Site_number.ToString().PadRight(10)} {Max_occupancy.ToString().PadRight(15)} {Accessible.ToString().PadRight(24)} {Max_rv_length.ToString().PadRight(15)} {Utilities.ToString().PadRight(14)}"); }