Running into System.MissingMethodException: Method Not Found with PrivateObject
According to the docs (http://msdn.microsoft.com/en-us/library/ms243710.aspx) the arguments are supposed to be passed as an array of objects. Explicitly passing an object array appears to work correctly:
var actual = (int)privateInfo.Invoke("SampleMethod", new object[] {0});
Passing 0 on its own appears to result in the compiler selecting this overload
Invoke(string name = "SampleMethod", System.Reflection.BindingFlags bindingFlags = Default, object[] args = {object[0]})