C#在函数内部获取函数的参数

foreach (var parameter in typeof(类名).GetMethod("方法名").GetParameters())
            {
                Console.WriteLine(parameter.ParameterType);//参数类型
                Console.WriteLine(parameter.Position);//参数位置
                Console.WriteLine(parameter.Name);//参数名
            }
原文地址:https://www.cnblogs.com/zhchsh/p/5655519.html