If the requirement is to get the
Text
value of the
Checked
CheckBox
and to assign to the
Label
then the following
LINQ
query can be used.
CheckBox selectedCheckBox =
Rpt_Company.Items.OfType<checkbox>().FirstOrDefault (cb => cb.Checked );
if (selectedCheckBox != null) Label1.Text = selectedCheckBox.Text;
where
Items
is collection of
Controls