Created
November 2, 2015 22:48
-
-
Save kumpera/e9c622f061be757b89dd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Reflection; | |
using System; | |
using System.Collections.Generic; | |
namespace DummyApp { | |
public class TestClass { | |
readonly List<string> testClassProperty = new List<string> (); | |
internal List<string> TestClassProperty { | |
get { | |
return testClassProperty; | |
} | |
} | |
} | |
} | |
namespace DummyApp { | |
class MainClass { | |
public static void Main (string[] args) | |
{ | |
var obj = new TestClass (); | |
obj.GetType ().InvokeMember ("TestClassProperty", BindingFlags.NonPublic | BindingFlags.GetProperty, Type.DefaultBinder, obj, null); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment