int count = 0;
foreach(CheckBo x cb in CBArray)
if(cb.Checked)
count++;
Not sure why you would want to know how may CheckBoxes are checked instead
of which ones.
On Wed, 16 Mar 2005 07:11:07 -0800, jez123456
<jez123456@disc ussions.microso ft.com> wrote:
[color=blue]
> Hi, I have a form with 6 checkboxes. What is the best way to count how
> many
> checkboxes have been checked?
>
> Thanks[/color]
It would also possible to use a CheckListBox where you could use
clb.CheckedItem s.Count
"jez123456" <jez123456@disc ussions.microso ft.com> schrieb im Newsbeitrag
news:2FC5FA4F-BF28-4D97-9840-0B5621BFC3DC@mi crosoft.com...[color=blue]
> Hi, I have a form with 6 checkboxes. What is the best way to count how[/color]
many[color=blue]
> checkboxes have been checked?
>
> Thanks[/color]
Comment