C# checking white space in a textbox -


how can check in c# there white space in textbox , perform operation after that?

this ensures multiple spaces caught in check.

 bool hasallwhitespace = txtbox1.text.length>0 &&                          txtbox1.text.trim().length==0; 

to check single space only:

 bool hassinglewhitespace = txtbox1.text == " "; 

Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -