/* * -this method doesn't return anything as it's set to 'void' * -why are the parameters 'Car car' passed in here? The small case 'car' is the input parameter, and the large case 'Car' is the datatype.Google Passing datatypes into methods. * -Therefore, I think it's essentialy doing the same as the following... * private static void printCarDetails(string inputParameter) // where 'string' is the 'data type' * - When passing objects into methods as parameters you need to state it's 'data type' first.... * private static void printCarDetails(<datatype variable_name) * eg. * private static void printCarDetails(Car _car) * -reference from video: Video 15 @ 18m 43sec - input parameter names */ // the myCar object is passed into this 'helper' method as a parameter (you need t pass it in as '<datatype> <variable>' // where the variable holds the myCar object // the helper method utiliss the built in method of the car class called 'FormatMe' private static void printVehicleDetails(Vehicle vehicle) { Console.WriteLine("Here are the vehicle's details: {0}", vehicle.FormatMe()); }
private static void printVehicleDetails(Vehicle vehicle) { Console.WriteLine("Here are the Vehicle's details: {0}", vehicle.FormatMe()); }
public static void PrintVehicledetails(Vehicle vehicle) { Console.WriteLine("Vehicle details : {0}",vehicle.FormatMe()); }
public static void PrintVehicledetails(Vehicle vehicle) { Console.WriteLine("Vehicle details : {0}", vehicle.FormatMe()); }
private static void printVehicleDetails(Vehicle car1) { Console.WriteLine("Here are the Car's details: {0}", car1.FormatMe()); }