need c# codes for following validation.
eg:sreekanth.K S
ie. only letters,dot,space.must be enter.
need c# codes for following validation.
eg:sreekanth.K S
ie. only letters,dot,space.must be enter.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
joakim wireen46 reputationPosted Apr 28, 2009, 12:06 AM EDT
public
static bool CorrectInput (string input){
foreach (char c in input){
if(!Char.IsLetter(c) && c != '.' && c!= ' ' ) return false;}
return true;}
this will return false if user writes anything but a letter, space or a dot.
Sreekanth199 reputationPosted Apr 28, 2009, 12:15 AM EDT
It works,Thanks 4 ur rply.