Using the dynamic type with await
This recipe shows you how to design a very basic type that is compatible with the
await operator and the dynamic C# type.
To step through this recipe, you will need Visual Studio 2015. You will need Internet access to download the NuGet package. There are no other prerequisites. The source code for this recipe can be found at
How to do it...
To learn how to use the
dynamic type with
await, perform the following steps:
- Start Visual Studio 2015. Create a new C# console application project.
- Add references to the ImpromptuInterface NuGet package by following these steps:
- Right-click on the References folder in the project, and select the Manage NuGet Packages… menu option.
- Now, ...