Пример #1
0
        public void CanGetNonPublicFieldAndProp()
        {
            Type         t = typeof(TypeWithNonPublics);
            PropertyInfo p = ReflectionTools.GetPropertyInfo(t, "Y", true, true);

            Assert.IsNotNull(p, "Should be able to get non public property!");

            // TODO: Include conditions for fields....
            FieldInfo f = ReflectionTools.GetFieldInfo(t, "X", true);

            Assert.IsNotNull(f, "Should be able to get non public field!");
        }