-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
public Task DoSome(int? value) // GCop628: Maybe define this method on 'Nullable' class as it's using 1 of its members (compared to 0 from this type)
{
if (value.HasValue)
return Task.CompletedTask;
return null;
}Obviously, we cannot move the method inside System.Nullable<T>. The rule should take into account the system types. Also note if you make the method static, then there is no warning.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels