Esempio n. 1
0
        static void Main(string[] args)
        {
            Car myCar = new Car();
            myCar.Make = "BMW";
            myCar.Model = "745li";
            myCar.Colour = "Black";
            myCar.Year = 2005;

            Truck myTruck = new Truck();
            myTruck.Make = "Ford";
            myTruck.Model = "F950";
            myTruck.Year = 2006;
            myTruck.Colour = "Black";
            myTruck.TowingCapacity = 1200;

            //someMethod(myCar);
            //someMethod(myTruck);
            myCar.PrintMe();
            myTruck.PrintMe();

            Console.ReadLine();
        }
Esempio n. 2
0
 private static void someMethod(Car car)
 {
     Console.WriteLine("From someMethod: {0}", car.Make);
 }