Giả sử chuỗi là -
Welcome User, Kindly wait for the image to load
Đối với Multiline String Literal, trước tiên hãy đặt nó giống như câu lệnh sau bằng cách sử dụng tiền tố @ -
string str = @"Welcome User, Kindly wait for the image to load";
Bây giờ hãy để chúng tôi hiển thị kết quả. Chuỗi hiện là một chuỗi nhiều dòng -
Ví dụ
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);
}
}
} Đầu ra
Welcome User, Kindly wait for the image to load