コード例 #1
0
 public void SetsObjectField()
 {
     var inst = new TestClass();
     inst.Set("PrivateField", "hello world");
     Assert.AreEqual("hello world", type.GetAnyField("PrivateField").GetValue(inst));
 }
コード例 #2
0
 public void GetsObjectProperty()
 {
     var inst = new TestClass();
     inst.Set("PublicProperty", "hello world");
     Assert.AreEqual("hello world", type.GetGetterSetter("PublicProperty").GetValue(inst, null));
 }