The “async” keyword is a modifier: if a base class has an overridable method that doesn’t have the async modifier, you CAN override it and add the async modifier to it.

For example, you can override the ButtonBase.OnClick method and make it async.

Then, internally, you can await on tasks (we had a really special scenario where we needed to do so).

One user on SO described this situation like this: “The sole purpose of the async keyword is to make await within the body of that function a keyword”.

 

Advertisements