C# Async Functions

I was reviewing the new C# specification and the changes that Async Functions made to my beloved language and saw the below section. The outcome has two impression, First it’s funny! Seeing 5 identical phrase in a series in a programming language expression is strange and funny, admit it. But other than that it is definitely complex. It shows all the grammatical and lexical efforts behind the scene for developing such robust and non-nonsense language. Thank you guys, I love the way C# is growing. Thanks.


The grammar of C# is extended as follows:



asyncopt anonymous-function-signature => anonymous-function-body

asyncopt delegate explicit-anonymous-function-signatureopt block

The async modifier is not allowed on method-declarations where the method-body is a ‘;’.

Note that async is a contextual keyword. In all syntactic contexts other than the ones above it is considered an identifier. Thus, the following is allowed (though strongly discouraged!):

using async = System.Threading.Tasks.Task;

async async async(async async) { }


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: