hi friends,
I want to understand following code line by line.........
private void button1_Click(object sender, EventArgs e)
{
label2.Text = "";
label3.Text = "";
foreach (object checkeditem in checkedListBox1.Items)
//why we cannot use instead of above line : foreach(CheckedListBox checkeditem in checkedListBox1.Items)
{
string str = checkedListBox1.GetItemCheckState(checkedListBox1.Items.IndexOf(checkeditem)).ToString();
//meaning of this line
if (str == "Checked")
//why we used "Checked" .
{
label2.Text = label2.Text + checkeditem.ToString() + "\n";
}
else
{
label3.Text = label3.Text + checkeditem.ToString() + "\n";
}
}
thanks....
Answers (5)
1
Hi Amit,
You can post this add in C# Corner Job section.
http://www.c-sharpcorner.com/jobs/recent-jobs
0
This is not a suitable place. Normally in this forum we are discussed about ASP.Net related things.Try to post your question in the relevant category.