哪位高手能告诉我List类中的 this(defaultCapacity)是什么意思??谢谢!!!
usingSystem;publicclassList<T>{constintdefaultCapacity=4;T[]items;intcount;publicList...
using System;
public class List<T>
{
const int defaultCapacity = 4;
T[] items;
int count;
public List() : this(defaultCapacity) { }
public List(int capacity)
{
items = new T[capacity];
}
public int Count
{
get { return count; }
} 展开
public class List<T>
{
const int defaultCapacity = 4;
T[] items;
int count;
public List() : this(defaultCapacity) { }
public List(int capacity)
{
items = new T[capacity];
}
public int Count
{
get { return count; }
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询