Пример #1
0
    static void Main(string[] args)
    {
        // create a GenericStack<T> using the derived type
        GenericStack <VolvoC30> volvoStack = new GenericStack <VolvoC30>();

        // push a data item into the stack
        volvoStack.Push(new VolvoC30());

        // print the details of the first item in the stack
        CarPrinter.PrintFirstCarDetails(volvoStack);

        // wait for input before exiting
        Console.WriteLine("Press enter to finish");
        Console.ReadLine();
    }
        static void Main(string[] args)
        {
            var printer = new CarPrinter();

            printer.PrintAll();
        }