Example #1
0
        static void Main(string[] args)
        {
            IReadOnlyInterface iexample = new ReadAndWriteImplementation();
            //iexample.Value = 1;
            Console.WriteLine(iexample.Value);

            var example = (ReadAndWriteImplementation)iexample;

            example.Value = 2;
            Console.WriteLine($"original {iexample.Value}");
            Console.WriteLine($"changed {example.Value}");

            Console.ReadKey();
        }
Example #2
0
        static void Main(string[] args)
        {
            IReadOnlyInterface iexample = new ReadAndWriteImplementation();

            //iexample.Value = 1;
            Console.WriteLine(iexample.Value);

            var example = (ReadAndWriteImplementation)iexample;

            example.Value = 2;
            Console.WriteLine($"original {iexample.Value}");
            Console.WriteLine($"changed {example.Value}");

            Console.ReadKey();
        }