Пример #1
0
        public void GetDynamicPropertyWithHidingTryGetMember()
        {
            dynamic d = new TestDynamicNameReflectiveNotOverride();

            Assert.Throws <RuntimeBinderException>(() => d.DynProp);
            Assert.Equal(2, d.VirtualReadonlyProperty);
        }
Пример #2
0
        public void SetDynamicPropertyWithHidingTrySetMember()
        {
            dynamic d = new TestDynamicNameReflectiveNotOverride();

            Assert.Throws <RuntimeBinderException>(() => d.DynProp = nameof(d.DynProp));
        }
Пример #3
0
 public void SetDynamicPropertyWithHidingTrySetMember()
 {
     dynamic d = new TestDynamicNameReflectiveNotOverride();
     Assert.Throws<RuntimeBinderException>(() => d.DynProp = nameof(d.DynProp));
 }
Пример #4
0
 public void GetDynamicPropertyWithHidingTryGetMember()
 {
     dynamic d = new TestDynamicNameReflectiveNotOverride();
     Assert.Throws<RuntimeBinderException>(() => d.DynProp);
     Assert.Equal(2, d.VirtualReadonlyProperty);
 }