rspec/rules/S4586/description.adoc

2 lines
225 B
Plaintext
Raw Normal View History

2021-01-27 13:42:22 +01:00
Returning ``++null++`` from a non-``++asyn{cpp}`` ``++Task++``/``++Task<T>++`` method will cause a ``++NullReferenceException++`` at runtime. This problem can be avoided by returning ``++Task.FromResult<T>(null)++`` instead.