1 方法的参数 1.1 必选参数 调用方法时实参的个数必须和定义方法时形参在数量和类型上匹配 /** * Created by Administrator on 2017/8/2 0002. */ function test(x: number): number { return x + 10; } let y = test(210); console.log(y); // let y02 = test(); // 报错:缺少参数信息 /** * Created by Administrator
using System; using System.Reflection; namespace ConsoleApp2 { class Program { static void Main(string[] args) { //反射获取 命名空间+类名 string className = "ConsoleApp2.ClassSample"; string methodName = "test1"; //传递参数 Object[] paras = new Obje