C# 类
时间:2019-04-18 22:25:56
收藏:0
阅读:101
可变参数
using System; namespace App{ class MyClass{ public static void Main(string[] args){ getdata(1,2,3,4); } static void getdata(params int[] arr){ foreach(int item in arr){ Console.WriteLine(item); } } } }
原文:https://www.cnblogs.com/mlh1421/p/10732566.html
评论(0)