class aaa
{
static void Main(string[] args)
{
Console.WriteLine(Test("111"));//不传值,显示111
Console.WriteLine(Test("111", "222"));//传一个值,显示111222
Console.WriteLine(Test("111", "222", "333"));//传多个值,显示111222333
Console.ReadKey();
}
static string Test(string name, params string[] str)
{
string strMess= name;
for (int i = 0; i < str.Length; i++)
strMess+= " " + str[i];
return strMess;
}
}