比如:
  public int MyMethod( int i, ref long k)
在为调用此方法准备参数的时候我遇到困难:请帮忙看看这个代码try
{
  Type objType;
  object objBinding;  objType = typeof(MyClass1);
  objBinding = Activator.CreateInstance(objType);  Type[] paramTypes = new Type[] {Type.GetType("System.Int32"), Type.GetType("System.Int32&")};
   
  MethodInfo m = objType.GetMethod("MyMethod",paramTypes);
  long p1=1,p2=100;
  object[] args = new object[2];
  args[0] = p1;
  args[1] = p2;   
  m.Invoke(objBinding,args);  //调用时出现NullReferenceException类型的异常
}
catch(Exception ee)
{
  Console.WriteLine("\terr:{0}",ee.Message); 
}