For weeks, no months I have been baffled by these now seen as simple terms await
and async
, I feel like I've finally learnt them. I use to think they were such advanced topics, and it really did take me such a long time to come to terms with what they actually meant.
I was wondering, even though I feel confident I understand them, anyone could verify? And sort of chip in if I've got anything wrong or you think I don't quite understand something 100%.
Async - Literally just an access modifier, nothing else, it has no effect other than a naming convention to let the caller know that it has some chance of containing the await
keyword. it also allows the visual studio to warn us if we don't add an await
keyword.
Await - Waiting for some sort of asynchronous code to complete, while blocking the code after it until it has been completed, ensure we get some kind of result or some work has been done.
How did I do, did I pass the test? I do have 1 question...
If we append the word Async
to our method name when including await
why do we need the async access modifier, is this for VS/C#'s benefit so it can warn us, or is there something more important I should understand about it.