3

in C++ it's

string x = "hello \
Hello";

it's \

in C# I really don't know :) but \ doesn't works and I can't find information. That's annoying.

0

2 Answers 2

4

Prefix your string with the @ symbol so that the newline character is included in the string.

string x = @"hello 
Hello";
Sign up to request clarification or add additional context in comments.

Comments

2
string x = @"Hello
world";

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.