Click here to Skip to main content
15,898,134 members

Comments by Sayan Bera (Top 45 by date)

Sayan Bera 28-May-14 8:42am View    
You can access Protected member of a class(student) only in the class(Csstudent) which derives it, Not any other class(Program).
Sayan Bera 28-May-14 8:39am View    
will this work?

class Program: student
{
static void Main(string[] args)
{
Csstudent cs = new Csstudent(101, "Sha", 56, 96);
cs.StudentDetails();

Program pp = new Program();
pp.DisplayData();

Console.ReadLine();
}
}
Sayan Bera 28-May-14 8:27am View    
Deleted
What is the error you are getting?
"cs.DisplayData();" is this giving error?
Sayan Bera 12-May-14 8:29am View    
Are you asking what to use or saying what you are using?
 
Anyways -> Handle the ItemChecked event for the control if you are using CheckedListBox.

private void OnItemChecked(object sender, ItemCheckEventArgs e)<br>
{
//foreach (string obj in checkedListBox1.CheckedItems)
//{
// MessageBox.Show(Obj);
//}
MessageBox.Show("Name: "+checkedListBox1.SelectedItem.ToString()+" Index: "+checkedListBox1.SelectedIndex.ToString());
}
Sayan Bera 12-May-14 8:09am View    
What is CHECKBOXLIST in C# Windows Application?
Are you using Few checkboxes or CheckedListBox?