Answers for "how to send button name for method in c#"

C#
0

how to send button name for method in c#

void button_Click(Object sender,  EventArgs e)
{
    var button = sender as Button;
    if(button != null)
    {
        button.Text = "X";
        button.ForeColor = System.Drawing.Color.Red;
    }

}
Posted by: Guest on January-08-2021

Code answers related to "how to send button name for method in c#"

C# Answers by Framework

Browse Popular Code Answers by Language