As others have stated, you start by having a method return Task or Task<TResult>. This is sufficient to await its result in .NET 4.5.
To have your method fit in as well as possible with future asynchronous code, follow the guidelines in the Task-based Asynchronous Pattern document (also available on MSDN). It provides naming conventions and parameter recommendations, e.g., for supporting cancellation.
For the implementation of your method, you have a few choices:
- If you have existing
IAsyncResult-based asynchronous methods, useTask.Factory.FromAsync. - If you have another asynchronous system, use
TaskCompletionSource<TResult>.