首页  编辑  

得到选中项的文本

Tags: /C#/界面处理/CheckedListBox/   Date Created:

private void button1_Click( object sender , EventArgs e)

{

    string output = string . Empty;

    for ( int i = 0 ; i < checkedListBox1 . CheckedIndices . Count; i ++ )

   {

       output += checkedListBox1 . Items[

           checkedListBox1 . CheckedIndices[i]] . ToString() + "\r\n" ;

   }

    MessageBox . Show(output);

}