Esempio n. 1
0
        static void Main(string[] args)
        {
            // Instantiating an object of Car() Class by using Type Inference called Car1
            var Car1 = new Car();

            // Using dot notation to call members on Car1
            Car1.Color   = "White";
            Car1.Year    = 2010;
            Car1.Mileage = 11000;

            var Car2     = new Car("Red", 2008);
            int carCount = Car.CountCars();

            Console.WriteLine($"There are {carCount} cars on inventory right now.");
            Console.ReadLine();
        }