本帖最后由 shencb 于 2010-12-21 11:45:55 编辑

解决方案 »

  1.   

    估计实现不了,AClass a1 = new AClass(1,2,3);
    这个实例化只是一个过程,完成后,机器没法知道是采用哪种构造函数进行实例化的。
      

  2.   

    MethodInfo m= obj.GetType().GetMethod("");
    ParameterInfo[] moveParam = m.GetParameters();StackFrame frame = new StackFrame(0);
    MethodBase m =  frame.GetMethod();
    ParameterInfo[] parameters = m.GetParameters();//反射参数列表
      

  3.   

    Test t = new Test(1, 2);
                    ConstructorInfo [] constructInfo = t.GetType().GetConstructors();
                    if (constructInfo != null)
                    {
                        foreach (ConstructorInfo construct in constructInfo)
                        {
                            ParameterInfo[] paraInfo = construct.GetParameters();
                            foreach(ParameterInfo para in paraInfo)
                            {
                                Console.WriteLine(para.Name+" "+para.ParameterType.Name);
                            }
                        }
                    }