- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to define multiline String Literal in C#?
Let’s say the string is −
Welcome User, Kindly wait for the image to load
For multiline String Literal, firstly set it like the following statement using@ prefix −
string str = @"Welcome User, Kindly wait for the image to load";
Now let us display the result. The string is a multi-line string now −
Example
using System; namespace Demo { class Program { static void Main(string[] args) { string str = @"Welcome User, Kindly wait for the image to load"; Console.WriteLine(str); } } }
Output
Welcome User, Kindly wait for the image to load
Advertisements