private static void displayFuelTypesToChoose() { Console.WriteLine("Please choose a fuel type: "); foreach (eKindOfFuel fuelType in Enum.GetValues(typeof(eKindOfFuel))) { Console.WriteLine("{0}. {1}", (int)fuelType, KindOfFuelEnumToText.AsText(fuelType)); } }
public override string ToString() { StringBuilder motorcycleString = new StringBuilder(); motorcycleString.AppendFormat("Kind of fuel: {0}, ", KindOfFuelEnumToText.AsText(r_KindOfFuel)); motorcycleString.AppendFormat("The amount of fuel left in litters: {0}. ", m_CurrentAmountOfFuelInLiters.ToString("F3")); return(motorcycleString.ToString()); }