How do you initiate a string without escaping each backslash?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
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
Brahma Prakash ShuklaRank #633 · 3.8K reputationPosted Nov 3, 2022, 7:03 AM EDT
You put an @ sign in front of the double-quoted string.
String ex = @"This has a carriage return\r\n"