public void GetDynamicPropertyWithHidingTryGetMember()
        {
            dynamic d = new TestDynamicNameReflectiveNotOverride();

            Assert.Throws <RuntimeBinderException>(() => d.DynProp);
            Assert.Equal(2, d.VirtualReadonlyProperty);
        }
        public void SetDynamicPropertyWithHidingTrySetMember()
        {
            dynamic d = new TestDynamicNameReflectiveNotOverride();

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