Skip to main content

RCS1229: Use async/await when necessary

Properties

PropertyValue
Default SeverityInfo
Minimum language version-

Examples

Example #1

diagnostic.cs
Task<object> FooAsync()
{
using (var service = CreateService())
{
return service.GetAsync();
}
}
fix.cs
async Task<object> FooAsync()
{
using (var service = CreateService())
{
return await service.GetAsync();
}
}

Applies to