Click here to Skip to main content
15,794,275 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello Sir,
I am trying to read a single blank space from text file.If a blank space are more than 5/10 then after reading string this spaces store in a one token?
How to implement this?Please help me...
Afzaal Ahmad Zeeshan 3-Mar-15 0:25am    

You can well read the strings from the file, and then check whether the starting characters are empty or not.
Sergey Alexandrovich Kryukov 3-Mar-15 0:27am    
Perhaps you just need to understand that blank space is just the character, no different from other characters...

You can try
string text = textBox.Text;
int length = text.Length;
if (length > 5 || length > 10)
  // write your logic here
Share this answer
Thanx Praneet Nadkar Sir.
it's very help full for me.
can u also help me to count the no of blank spaces..
Share this answer
Sergey Alexandrovich Kryukov 3-Mar-15 1:22am    
Not an answer. Such posts are considered as abuse, sorry. Please remove it and add a comment to the answer instead. Only then the post author can get the notification.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900