public override string ToString()
        {
            string[] months = new string[] { "empty", "January", "February", "March", "April", "May", "June",
                                             "July", "August", "September", "October", "November", "December" };
            string strFromMonth = months[OpenFromMonth].ToString();
            string strToMonth   = months[OpenToMonth].ToString();

            return(CampgroundId.ToString().PadLeft(5).PadRight(17) + Name.PadRight(32) + strFromMonth.PadRight(16) + strToMonth.PadRight(16) + DailyFee.ToString().PadRight(5));
        }
 public override string ToString()
 {
     return("#" + CampgroundId.ToString().PadRight(10) + CampgroundName.PadRight(30) + CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(CampgroundOpenMonth).PadRight(15) + CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(CampgroundCloseMonth).PadRight(15) + DailyCost.ToString("C2").PadRight(10));
 }
 public override string ToString()
 {
     return(CampgroundId.ToString().PadRight(6) + ParkId.ToString().PadRight(6) + Name.PadRight(30) + OpenFromMonth.ToString().PadRight(30) + DailyFee.ToString().PadRight(10));
 }
Exemple #4
0
 //Display the campground information
 public override string ToString()
 {
     return($"#{CampgroundId.ToString(),-10} {Name,-20}{monthConversion[OpenMonth],-15}{monthConversion[ClosedMonth],-12}{DailyFee:C2}");
 }
 public override string ToString()
 {
     return(CampgroundId.ToString().PadRight(5) + Name.PadRight(35) + DateTimeFormatInfo.CurrentInfo.GetMonthName(OpenFrom).PadRight(12) + DateTimeFormatInfo.CurrentInfo.GetMonthName(OpenTil).ToString().PadRight(12) + DailyFee.ToString("C2"));
 }
Exemple #6
0
 public override string ToString()
 {
     return(SiteId.ToString().PadRight(6) + CampgroundId.ToString().PadRight(6) + SiteNumber.ToString().PadRight(30) +
            MaxOccupancy.ToString().PadRight(30) + Accessible.ToString().PadRight(10) + MaxRVLength.ToString().PadRight(10) +
            Utilities.ToString().PadRight(10));
 }
Exemple #7
0
 public override string ToString()
 {
     return(CampgroundId.ToString().PadRight(5) + Name.PadRight(35) + OpenMonth.ToString().PadRight(10) + ClosingMonth.ToString().PadRight(10) + "$" + Math.Round(DailyFee * 1.00m, 2, MidpointRounding.AwayFromZero));
 }
Exemple #8
0
 public override string ToString()
 {
     return(CampgroundId.ToString().PadRight(10) + Name.ToString().PadRight(35) + OpenMonth.ToString().PadRight(20) + CloseMonth.ToString().PadRight(20) + "$" + DailyFee.ToString().PadRight(20));
 }
Exemple #9
0
 public override string ToString()
 {
     return(CampgroundId.ToString().PadRight(5) + Name.PadRight(35) + OpenFrom.ToString().PadRight(15) + OpenTo.ToString().PadRight(15) + Fee.ToString("C2").PadRight(6));
 }
Exemple #10
0
 // Formats campground details to look nice and neat
 public override string ToString()
 {
     return(CampgroundId.ToString().PadRight(15) + CampgroundName.ToString().PadRight(50) + OpenDate.ToString().PadRight(15) + CloseDate.ToString().PadRight(20) + "$" + DailyFee.ToString());
 }