मान लें कि स्ट्रिंग है -
Welcome User, Kindly wait for the image to load
मल्टीलाइन स्ट्रिंग लिटरल के लिए, सबसे पहले इसे निम्न कथन की तरह @ उपसर्ग का उपयोग करके सेट करें -
string str = @"Welcome User, Kindly wait for the image to load";
अब हम परिणाम प्रदर्शित करते हैं। स्ट्रिंग अब एक बहु-पंक्ति स्ट्रिंग है -
उदाहरण
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);
}
}
} आउटपुट
Welcome User, Kindly wait for the image to load