C# 获取方法内参数名称
public partial class Main : Form { public Main() { foreach(var parameter in typeof(Main).GetMethod("fnAAA").GetParameters()) { Console.WriteLine(parameter.Name); } /* a b c */ } public string fnAAA(string a, string b, string c) { return ""; }
来源:http://blog.csdn.net/q107770540/article/details/6053218
此随笔或为自己所写、或为转载于网络。仅用于个人收集及备忘。