469,914 Members | 2,124 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,914 developers. It's quick & easy.

C# how to distinguish whether input is char string or return key pressed

1
I am prompting the user for name

if he/she returns non empty string
validate the input string
it should contain only alphabets
no special characters or numbers
else if he/she enters Quit
quit the program
else if he/she just presses return key
quit the program

Plz help
how to do all the above
Feb 1 '08 #1
3 3551
debasisdas
8,127 Expert 4TB
Thread moved to .net forum from articles section.
Feb 1 '08 #2
r035198x
13,262 8TB
I am prompting the user for name

if he/she returns non empty string
validate the input string
it should contain only alphabets
no special characters or numbers
else if he/she enters Quit
quit the program
else if he/she just presses return key
quit the program

Plz help
how to do all the above
What have you done so far?
Feb 1 '08 #3
Plater
7,872 Expert 4TB
This sounds a lot like an assignment, which is a no no.
And if I am right, then you should have gotten some basic material that covers how you would do this.
Feb 1 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Scott Shaw | last post: by
8 posts views Thread by ais523 | last post: by
2 posts views Thread by pelletier.thomas | last post: by
7 posts views Thread by Simon | last post: by
4 posts views Thread by Jules | last post: by
27 posts views Thread by =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.