foreach(object listItem in this.listBox1.Items)
{
listItem.ToString()...//这就是每一项的文本
}

解决方案 »

  1.   

    for(int i=0 ;i<this.listBox1.Items.count;i++){
    string str=this.listBox1.Items[i].ToString();
    把str保存;
    }
      

  2.   

    string s="";
    for(int i=0;i<this.listBox1.Items.Count;i++)
    {
    s=s+this.listBox1.Items[i].ToString()+","; }
      

  3.   

    你可以遍历Item集合,就可以得到你要的结果
    例如
    private void Foo_save(string sData)
    {
    ....
    }
    private void getdata()
    {
       foreach (System.Windows.Forms.ListViewItem  it in listBox1.Items )
    {
    Foo_save(it.Text );
    }}
      

  4.   

    ArrayList al = new ArrayList(ListBox1.Items.Count);foreach(object item in ListBox1.Items)
    {
        al.add(item.ToString());
    }
      

  5.   

    你把ListBox的Items直接序列化到文件就可以了,需要的时候在反序列化,不过反序列化不能直接对Items赋值,可以把反序列化的结合中的元素再加进来就行了