What is a Sender in windows form? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is a Sender in windows form?

Hi, In my windows form apk when i want to chose event top of event for coding write =>Object sender

13th Jun 2020, 6:02 AM
Gadir
Gadir - avatar
1 Answer
0
sender is the object that causes the event to happen. In the case of an onclick-event on a button, it is the button. You can use sender as an object and refer to it. if(sender is Button) // cast to Button else if (sender is TextBox) // cast to TextBox else is (sender is CobmoBox) // cast to ComboBox
13th Jun 2020, 3:08 PM
sneeze
sneeze - avatar