Example #1
0
        public static void Main(String[] args)
        {
            Car myCar = new Car();

            myCar.Make  = "Toyota";
            myCar.Model = "Camry";
            myCar.Year  = 2007;
            myCar.Color = "white";
            myCar.Doors = 4;

            myCar.PrintDetails();

            someMethod(myCar);

            Truck myTruck = new Truck();

            myTruck.Make           = "Ford";
            myTruck.Model          = "Ranger";
            myTruck.Year           = 2000;
            myTruck.Color          = "purple";
            myTruck.TowingCapacity = 12000;

            myTruck.PrintDetails();

            someMethod(myTruck);

            Console.ReadLine();
        }
        static void Main(string[] args)
        {
            Car myCar = new Car("Nissan", "Sentra", 2000, "Silver");
            Car otherCar = new Car();
            Truck myTruck = new Truck("Nissan", "Frontier", 2014, "Silver", 10000);

            myCar.PrintDetails();
            otherCar.PrintDetails();
            myTruck.PrintDetails();
            Console.ReadLine();
        }