不知道数据库是否可以,不过似乎这样资源就耗得大了
还有一点随便想的
string的话可以尝试用 StringBuilder

解决方案 »

  1.   

    你可以自己写
    如:public class Test
    {
       private string[] _columnName;
       public void Add( string column )
    {
    string[] t;
    if(this.Count>0)
    {
    t = new string[this.Count+1];
    this._columnName.CopyTo(t,0);
    t[this.Count] = column;
    }
    else
    {
    t = new string[]{column};
    }
    this._columnName = t;
    } public void Remove( string column )
    {
    if(Contains(column))
    {
    string[] t = new string[this.Count-1];
    int index = 0;
    for(int i=0;i<this.Count;i++)
    {
    if(!this.Equal(i,column))
    {
    t[index] = this._columnName[i];
    index++;
    }
    }
    this._columnName = t;
    }
    }
    public int Count
    {
    get
    {
    if(this._columnName != null)
    return this._columnName.Length;
    else
    return -1;
    }
    }}