eg:
string str = "sentence 1";
str +="sentence 2";
Currrent output :
sentence 1 sentence 2
Desired Output :
sentence 1
sentence 2
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sam HobbsRank #107 · 20.5K reputationPosted Feb 1, 2011, 8:44 AM EST
FroglegRank #1,020 · 1.9K reputationPosted Feb 1, 2011, 8:52 AM EST
string str = "sentence 1\r\n";
str += "sentence 2";
2:
string str = "sentence 1";
str += Environment.NewLine;
str += "sentence 2";