rspec/rules/S4586/description.adoc
2021-01-27 16:57:09 +01:00

2 lines
223 B
Plaintext

Returning ``++null++`` from a non-``++async++`` ``++Task++``/``++Task<T>++`` method will cause a ``++NullReferenceException++`` at runtime. This problem can be avoided by returning ``++Task.FromResult<T>(null)++`` instead.