Exemplo n.º 1
0
        public static void Interface()
        {
            var anotherStruct = new AnotherStruct();

            (anotherStruct as IAnotherStruct).DoSomething();
            anotherStruct.DoSomething();
        }
Exemplo n.º 2
0
 public GetterOnlyProperties()
 {
     _intList = new List <int>();
     IntStringDictionaryWithPrivateSetter = new Dictionary <int, string>();
     _intStringDictionary = new Dictionary <int, string>();
     _customClass         = new AnotherClass();
     _customClassArray    = new [] { new AnotherClass {
                                         A = 42
                                     } };
     _customStruct = new AnotherStruct();
 }