using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TestParams:MonoBehaviour{
private void Start(){
test(1,2,3,4);
test(1,4);
int[] list= { 1, 2, 3, 4, 5, 6 };
test(list);
}
private void test(params int[] list){
}
}
C#可变参数params
猜你喜欢
转载自www.cnblogs.com/kingBook/p/10222306.html
今日推荐
周排行