static void Main(string[] args) { Car.Display(); Car myCar = new Car(); Car myCar2 = new Car("BMw", "asdsad", "white", 2001); Console.ReadLine(); }
static void Main(string[] args) { Car myCar = new Car(); //set properties Car myOtherCar = myCar; Car myThirdCar = new Car("Ford", "Escape", 2005, "White"); }
static void Main(string[] args) { Car myCar = new Car(); //set properties Car OtherCar = myCar; Car newCar = new Car("Ford","Escape",2000,"Black"); Car.mymethod(); //created without an object }
static void Main(string[] args) { Car myCar = new Car(); myCar.Make = "Chevrolet"; Car mySecondCar = new Car("Fiat", "Uno", "red", 2012); Car myThirdCar = new Car { Make = "Ford", Year = 2000, }; Console.WriteLine(mySecondCar.Make); Console.ReadLine(); }
static void Main(string[] args) { Car myCar = new Car(); // set properties Car myOtherCar = myCar; Car myThirdCar = new Car("Honda", "Civic", 1998, "Red"); myOtherCar = null; myCar = null; Car.Equals }
static void Main(string[] args) { Car myCar = new Car(); }
static void Main(string[] args) { Car myCar = new Car("Ford", "Escape", 2000, "Blue"); }