Reputation: 13
I need to convert often
to Bunifu.Framework.UI.BunifuCheckbox
. my current code:
foreach (Control often in d.flowLayoutPanel1.Controls.OfType<Bunifu.Framework.UI.BunifuCheckbox>())
{
Bunifu.Framework.UI.BunifuCheckbox Checkbox4 = often;
//how can i make this work?
}
thanks
Upvotes: 0
Views: 80
Reputation: 36
You just need to cast them as that specific type, like this:
Bunifu.Framework.UI.BunifuCheckbox Checkbox4 = (Bunifu.Framework.UI.BunifuCheckbox) often;
OR
Bunifu.Framework.UI.BunifuCheckbox Checkbox4 = often as Bunifu.Framework.UI.BunifuCheckbox;
Upvotes: 0