Object Sender and EventArgs

Consider this function signature:

Private Void TextBox1_TextChange(Object Sender, EventArgs e)

As far as I know, I understand this as shown below.

  • Private is a modifier

  • Void is a return type

  • TextBox1_TextChange is the name of the event.

Maybe I'm wrong in the above case, since I just started to practice in C #, Visual Studio 2005.

What is a definition / value (Object Sender, EventArgs e)and how does it work?

+5
source share
2 answers

TextChange (possibly) the name of the corresponding event, although the event is not shown in the code snippet, so I cannot be sure.

TextBox1_TextChange is the name of the method that is likely configured to handle the event.

Object Sender - , Sender, /, .

EventArgs e - , e, , . EventArgs MSDN .

. , " " , , .

, , , .

+7

: . TextBox1 . EventArgs e: e EventArgs, TextChange e, .

+2

All Articles