SyntaxFix
Write A Post
Hire A Developer
Questions
You can use Trim if you want to remove from start and end.
Trim
string stringWithoutNewLine = "\n\nHello\n\n".Trim();