RCS1229: Use async/await when necessary
Properties
Property | Value |
---|---|
Default Severity | Info |
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();
}
}