Why does StringBuilder.AppendLine not add a new line with some strings?

后端 未结 6 984
耶瑟儿~
耶瑟儿~ 2021-01-03 17:43

I\'m trying to use stringbuilder to create a body of string to be used in a text (not HTML) email. However some lines (where i include dynamic data, a new line is not added,

6条回答
  •  攒了一身酷
    2021-01-03 18:47

    Instead of

    sbUser.AppendLine();
    

    Try using

    sbUser.Append(Environment.NewLine);
    

    No idea why this works...

提交回复
热议问题