Telegram Group & Telegram Channel
توابعی که خروجی Task دارند ولی از کیورد async توشون استفاده نشده در واقع sync هستند.
در مثالی که در تصویر میبینید شاید تصور بشه که متد Example باید در پس زمینه اجرا بشه ولی این اتفاق نمیوفته و کاملا به صورت sync اجرا خواهد شد. این متد در واقع مثل بقیه ی متد های sync فقط یک خروجی Task داره. مثل متد زیر:
static string Example()

پس حواستون باشه که اشتباه نکنید.

#تخصصی
#سی_شارپ
#dotnet
#csharp
#task
#async

@CSharpTips



tg-me.com/CsharpTips/354
Create:
Last Update:

توابعی که خروجی Task دارند ولی از کیورد async توشون استفاده نشده در واقع sync هستند.
در مثالی که در تصویر میبینید شاید تصور بشه که متد Example باید در پس زمینه اجرا بشه ولی این اتفاق نمیوفته و کاملا به صورت sync اجرا خواهد شد. این متد در واقع مثل بقیه ی متد های sync فقط یک خروجی Task داره. مثل متد زیر:

static string Example()

پس حواستون باشه که اشتباه نکنید.

#تخصصی
#سی_شارپ
#dotnet
#csharp
#task
#async

@CSharpTips

BY C# Programming Guide




Share with your friend now:
tg-me.com/CsharpTips/354

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

Importantly, that investor viewpoint is not new. It cycles in when conditions are right (and vice versa). It also brings the ineffective warnings of an overpriced market with it.Looking toward a good 2022 stock market, there is no apparent reason to expect these issues to change.

The S&P 500 slumped 1.8% on Monday and Tuesday, thanks to China Evergrande, the Chinese property company that looks like it is ready to default on its more-than $300 billion in debt. Cries of the next Lehman Brothers—or maybe the next Silverado?—echoed through the canyons of Wall Street as investors prepared for the worst.

telegram from in


Telegram C# Programming Guide
FROM USA