C#高級語法基礎知識總結6——字符串&集合

字符串   集合 列表聲明 Var intList=new List<int>(); Var racers=new List<Racer>(); List<int> intList=new List<int>(10);//大小爲10,倍數增加   使用Capacity屬性可以獲取和設置集合的容量 使用Count屬性可以獲取集合的元素個數 Add()方法添加元素 AddRange()可以一次給集
相關文章
相關標籤/搜索