Exemple #1
0
        public void Run()
        {
            var driverName = Reader.ReadLine();
            var driver     = new Ferrari(driverName);

            Writer.Write($"{driver.Model}{driver.Brakes()}{driver.Gas()}{driver.Name}");
        }
Exemple #2
0
    static void Main()
    {
        var driverName = Console.ReadLine();

        var ferrari = new Ferrari(driverName);

        Console.WriteLine($"{ferrari.Model}/{ferrari.UseBrakes()}/{ferrari.Gas()}/{ferrari.Driver}");
    }
Exemple #3
0
    public static void Main()
    {
        var     input   = Console.ReadLine();
        Ferrari ferrari = new Ferrari(input);

        Console.WriteLine($"{ferrari.Model}/{ferrari.Breaks()}/{ferrari.Gas()}/{ferrari.Driver}");

        string ferrariName       = typeof(Ferrari).Name;
        string iCarInterfaceName = typeof(ICar).Name;

        bool isCreated = typeof(ICar).IsInterface;

        if (!isCreated)
        {
            throw new Exception("No interface ICar was created");
        }
    }