Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 395 Bytes

PH_S025.md

File metadata and controls

9 lines (5 loc) · 395 Bytes

PH_S025 - Unused Synchronous Task Result

Problem

A synchronously computed value is returned with Task.FromResult(...). Although, the method only returns a task without a value; thus, the value is unnecessary.

Solution

Either change the return type of the method, so it returns the computed value. Alternatively, replace the use of Task.FromResult(...) with Task.CompletedTask.