码迷,mamicode.com
首页 > Windows程序 > 详细

C# 获取方法内参数名称

时间:2018-01-07 15:58:23      阅读:342      评论:0      收藏:0      [点我收藏+]

标签:post   body   article   var   param   return   ret   来源   bsp   

 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

C# 获取方法内参数名称

标签:post   body   article   var   param   return   ret   来源   bsp   

原文地址:https://www.cnblogs.com/shy1766IT/p/8227791.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!