नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
The using keyword has two major uses:
- The
usingstatement defines a scope at the end of which an object is disposed:
string filePath = "example.txt";
string textToWrite = "Hello, this is a test message!";
// Use the using statement to ensure the StreamWriter is properly disposed of
using (StreamWriter writer = new StreamWriter(filePath))
{
writer.WriteLine(textToWrite);
}
- The
usingdirective creates an alias for a namespace or imports types defined in other namespaces:
using System;
using System.IO;
See also
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहां आप मुद्दों को बना सकते हैं और उनकी समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं। अधिक जानकारी के लिए, हमारी योगदानकर्ता मार्गदर्शिका देखें।