Multiple choice .net

Which argument in the KeyPress parameter list contains the Handled property?

  1. Sender

  2. e

  3. Object

  4. KeyPressEventArgs

  5. None of the above.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In .NET event handlers, the second parameter (conventionally named 'e') carries the event data. For a KeyPress event, 'e' is an instance of KeyPressEventArgs, which contains the Handled property used to cancel or confirm the character input.