Removing line breaks using C#

前端 未结 5 1973
时光取名叫无心
时光取名叫无心 2021-02-20 03:55

I am getting a string from database field named \'Description\' and it has line breaks. It looks like this:


Header of Items

Description goes here.This the

5条回答
  •  隐瞒了意图╮
    2021-02-20 04:24

    use that code for replace new line

    myString = myString.Replace(System.Environment.NewLine, "replacement text");

提交回复
热议问题