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: |

That growth environment will include rising inflation and interest rates. Those upward shifts naturally accompany healthy growth periods as the demand for resources, products and services rise. Importantly, the Federal Reserve has laid out the rationale for not interfering with that natural growth transition.It's not exactly a fad, but there is a widespread willingness to pay up for a growth story. Classic fundamental analysis takes a back seat. Even negative earnings are ignored. In fact, positive earnings seem to be a limiting measure, producing the question, "Is that all you've got?" The preference is a vision of untold riches when the exciting story plays out as expected.

The STAR Market, as is implied by the name, is heavily geared toward smaller innovative tech companies, in particular those engaged in strategically important fields, such as biopharmaceuticals, 5G technology, semiconductors, and new energy. The STAR Market currently has 340 listed securities. The STAR Market is seen as important for China’s high-tech and emerging industries, providing a space for smaller companies to raise capital in China. This is especially significant for technology companies that may be viewed with suspicion on overseas stock exchanges.

telegram from br


Telegram C# Programming Guide
FROM USA