2

こんなことをしたいです。

String s = "";
foreach (var item in checkedListBox1.Items)
{
        s = checkedListBox1.Items(item).tostring;
         // do something with the string
}

stringリストボックスにあるアイテムのを欲しいのですが。

どうすればそれを実行できますか?

4

3 に答える 3

1

まだ試していませんが、うまくいくと思います。

string s = "";
foreach (var item in checkedListBox1.Items)
{
        s = item.ToString();
         // do something with the string
}
于 2013-03-09T15:21:20.313 に答える
0
string  s = "";
foreach (string item in checkedListBox1.Items)
{
   s = item;
   // do something with the string

}
于 2013-03-09T15:18:01.093 に答える
0

私はあなたが探しているのはこれだと信じています:

foreach (var item in checkedListBox1.Items)
{
    checkedListBox1.GetItemText(item);
}

おそらく最も有用ではありませんが、ここにそのためのMSDNがあります。

于 2013-03-09T15:19:19.773 に答える