static void Main(string[] args)
    {
        MyCodeService  service         = new MyCodeService();
        IMyCodeService serviceContract = (IMyCodeService)service;
        IMyCode        codeContract    = (IMyCode)service;

        service.GetResult();
        serviceContract.GetResult();
        codeContract.GetResult();
        Console.ReadKey();
    }
Пример #2
0
        static void Main(string[] args)
        {
            MyCodeService  service         = new MyCodeService();
            IMyCodeService serviceContract = (IMyCodeService)service;
            IMyCode        codeContract    = (IMyCode)service;

            service.GetResult();
            serviceContract.GetResult();
            codeContract.GetResult();


            // Prevents from shutdown console window
            Console.ReadKey();
        }