public void CanAccessPrivateProp() { var testObj = new TestClass(); TestClassAccessor[testObj, "HiddenProp"] = "TEST"; Assert.AreEqual("TEST", testObj.GetHiddenProp()); Assert.AreEqual("TEST", TestClassAccessor[testObj, "HiddenProp"]); }