Click here to Skip to main content
15,908,254 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
plz help give me reply its very urgent plzzz
Posted
Comments
[no name] 15-Jul-13 8:27am    
It was so urgent that you could not be bothered to ask a question or describe some sort of a problem? And, no it is not urgent at all.

1 solution

Try this :

C#
string newString = string.Empty;

           char[] input = "Hi In my applcation for example there are 160 characters or more .... i want to split after 50 characters in next line if hi i want to break after the completion of word.".ToCharArray();

           int toSplit = 50;

           for (int i = 0; i < input.Count(); i++)
           {

               if (i % toSplit == 0 && i != 0) newString += Environment.NewLine;

               newString += input[i].ToString();

           }
           label1.Text = newString;
 
Share this answer
 

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