I always need to access the properties of other buttons, I know there's a simpler way to do it.
In this example I want to mark one button and unmark other buttons
button01.BorderWidth = 0; button2.BorderWidth = 0; button3.BorderWidth = 0; button4.BorderWidth = 0; button5.BorderWidth = 0; button6.BorderWidth = 0; // add border to this button Button btn = (Button)sender; btn.BorderWidth = 3; btn.BorderColor = Color.Blue;
So how can I make this code simpler?
Thank you in advance.