{I+=codeWee;}
[C#] How to use reflection to invoke a private method
	public class A
	{
		private void Do()
		{
			Console.WriteLine("Do");
		}
	}


...

	A a = new A();

	Type thisType = a.GetType();
	MethodInfo theMethod = thisType.GetMethod("Do", BindingFlags.NonPublic | BindingFlags.Instance);
	theMethod.Invoke(a, null);
HTML | PHP | C++ | DirectX11 | Javascript | C# | HTML5 | ASP | SQL | General | CSS | Oculus Rift | Unity3d | Virtools SDK | Tip | NSIS | PowerShell | node.js | Web API | RTSP | All
Copyright© 2016 CodeWee.com All rights reserved.