async/await ऐसा asynchronous, non-blocking कोड लिखने में सक्षम बनाता है जो synchronous कोड की तरह पढ़ा जाता है। यह I/O-bound काम (database, network, file access) के लिए आवश्यक है — यह किसी प्रोग्राम को धीमे operations की प्रतीक्षा करते समय दूसरे काम (या requests) संभालने देता है, जिससे responsiveness और scalability बेहतर होती है।
मूल पैटर्न
{
client = HttpClient();
result = client.GetStringAsync(url);
result;
}
data = GetDataAsync();
