摘要: 一般情况下,函数中参数是确定的。但是在某些情况下,函数的参数个数可以根据需要改变而改变,可变参数的函数使用方法是在参数前加params。以下是我的一个demo:查看代码 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace demo 7 { 8 class Program 9 {10 static void Vfunc(params string[] values)11 {12 ... 阅读全文
posted @ 2012-03-12 15:33 清晨の雨露 阅读(9064) 评论(0) 推荐(0) 编辑