In my code, I've got a class called "teacher" which has some arrays inside of it:
Expand|Select|Wrap|Line Numbers
- public class teacher
- {
- //monday
- public bool[] mon = new bool[11];
- //tuesday
- public bool[] tue = new bool[11];
- //wednesday
- public bool[] wed = new bool[11];
- //thursday
- public bool[] thu = new bool[11];
- //fri
- public bool[] fri = new bool[11];
- };
Expand|Select|Wrap|Line Numbers
- List<teacher> teachers = new List<teacher>();
Expand|Select|Wrap|Line Numbers
- teachers.Add(new teacher
- {
- mon[0] = checkBox25.Checked,
- mon[1] = checkBox26.Checked,
- mon[2] = checkBox27.Checked,
- }
//EDIT
I've changed that last bit of code into
Expand|Select|Wrap|Line Numbers
- mon = {checkBox25.Checked, checkBox26.Checked, checkBox27.Checked, checkBox28.Checked, checkBox29.Checked, checkBox30.Checked, checkBox31.Checked, checkBox32.Checked, checkBox33.Checked, checkBox34.Checked, checkBox35.Checked},