コード例 #1
0
        public void ReadViaReflection_IsPropertyValue()
        {
            var instance = new TestReflectionClass1 {
                PublicProperty = 6
            };

            Assert.AreEqual(6, instance.ReadViaReflection("PublicProperty"));
        }
コード例 #2
0
        public void ReadViaReflection_IsFieldValue()
        {
            var instance = new TestReflectionClass1 {
                PublicField = 5
            };

            Assert.AreEqual(5, instance.ReadViaReflection("PublicField"));
        }