Async get and set

Is it possible to create properties using async getand methods set?

if so, how?
if not, how should I correctly access asynchronous methods in getand set?

+5
source share
2 answers

No. From section 10.15 of the C # 5 specification:

A method (Β§10.6) or an anonymous function (Β§7.15) with the async modifier is called an asynchronous function. In general, the term async is used to describe any function that has the async modifier.

So these are just methods, lambda expressions, and anonymous methods that can use the modifier async.

, , , , Task<T>, T. "" , .

+8

. , (async Task<T> getFoo() async Task setFoo(T item)), .

+3

All Articles