I am facing a problem with string array. please help me here. 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 the string array has a new line or not. If it doesn't have a new line, append to it, I need to append the new line characters 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?