मान लें स्ट्रिंग है -
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