4
Reply

How to test if the user pressed the Enter Key?

Ask a question
H Mroweh

H Mroweh

17y
2.2k
1

Dear All,

I have a C# program and I have an on KeyPress event. I want to test the value of the key and find out if it is the Enter key. My code is like this:

public viod MyKeyPress(KeyPressEventArgs e)

{

if(e.KeyChar )

}


Answers (4)