Invalid Bunifu Cast

0

I am trying to create a function so it gets the name of the button(sender) but I get this error.

System.InvalidCastException HResult=0x80004002 to cast object of type
'Bunifu.Framework.UI.BunifuFlatButton' to type
'Bunifu.UI.WinForms.BunifuButton.BunifuButton'

Code:

using Bunifu.UI.WinForms.BunifuButton;

private void Dashboard_Bt_Click(object sender, EventArgs e)
    {
        string objname = ((BunifuButton)sender).Name;

        label1.Text = objname;
    }
c#
bunifu
asked on Stack Overflow Jul 11, 2018 by The Gamerzs

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0