static void Main(string[] args) { Car myCar = new Car(); Car myOtherCar = myCar; Car myThirdCar = new Car("Ford", "Escape", 2005, "White"); myOtherCar = null; myCar = null; Car.MyMethod(); }
static void Main(string[] args) { Car myCar = new Car(); Car.MyMethod(); /* myCar.Make = "Oldmobile"; myCar.Model = "Cutlas Supreme"; myCar.Year = 1986; myCar.Color = "Silver"; */ //Car myThirdCar = new Car("Ford", "Escape", 2005, "White"); /* Car myOtherCar; myOtherCar = myCar; Console.WriteLine("{0} {1} {2} {3}", myOtherCar.Make, myOtherCar.Model, myOtherCar.Year, myOtherCar.Color); myOtherCar.Model = "98"; Console.WriteLine("{0} {1} {2} {3}", myCar.Make, myCar.Model, myCar.Year, myCar.Color); myOtherCar = null; Console.WriteLine("{0} {1} {2} {3}", myOtherCar.Make, myOtherCar.Model, myOtherCar.Year, myOtherCar.Color); myCar = null; */ Console.ReadLine(); }
static void Main(string[] args) { Car myCar = new Car(); // set properties Car myOtherCar = myCar; Car myThirdCar = new Car("Ford", "Escape", 2005, "White"); myOtherCar = null; myCar = null; }
static void Main(string[] args) { Car meinAuto = new Car(); }