How to Append new line in each element of string array

  • Thread starter Thread starter Learning Rocks
  • Start date Start date
L

Learning Rocks

Guest
Hello Everyone,

I am facing bit problem with string array. pls help me here

Actually i have a string like below

string[] str1;
str1 = new string[5]{ “Element 1”, “Element 2”, “Element 3”, “Element 4”, “Element 5” };


Here i want to check each element in string array has new line or not. If it's not having new line append to it, i need to append new line like below

str1 = new string[5]{ “Element 1\n”, “Element 2\n”, “Element 3\n”, “Element 4\n”, “Element 5\n” };


How to achieve this.


Pls help me


Thanks,

Continue reading...
 
Back
Top