Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello Sir/Mam,
count the number of white spaces if more than 5 spaces are occur in the file then after that 5 spaces text store in OR print in text box.
Posted
Updated 9-Mar-15 22:47pm
v2
Comments
Peter Leow 10-Mar-15 3:47am    
If (Take a breath && type slowly && insert proper punctuation marks) Then
we can understand you better.
What is the issue here?

C#
int countSpaces = mystring.Count(Char.IsWhiteSpace); // will gives you the number of white spaces in the input string (mystring)
 
Share this answer
 
C#
I Count the white spaces but I Want ..
if(countnospace > 5)
{
   display the text after that 5 spaces in a text box.
   same way check for next...
}
 
Share this answer
 
v2

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