Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have the following issue,

C#
string DataOutputLog = string.Join("", dataout.ToArray());
return DataOutputLog;



the dataout = is a list (string)
with content:

- line(txt)
- line(txt)
- line(txt)
- line(txt)
- line(txt)
- line(txt)

the return = all lines in one line.
like: -line(text) -line(text) -line(text) -line(text)

I want all the data of the list (string) in one single string return.
like this in one single string:

- line(txt)
- line(txt)
- line(txt)
- line(txt)

anyone knows a simple option for this?
Posted

1 solution

C#
string DataOutputLog = string.Join(Environment.NewLine, dataout.ToArray());
 
Share this answer
 
Comments
Wessel Beulink 16-Apr-14 8:17am    
thanks! when i saw this, the \n was a option too..
hehe but it works Tumbs up for you!

thanks!
phil.o 16-Apr-14 9:12am    
You're welcome :)

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