== Why is this an issue? Returning ``++null++`` or ``++default++`` instead of an actual collection forces the method callers to explicitly test for null, making the code more complex and less readable. Moreover, in many cases, ``++null++`` or ``++default++`` is used as a synonym for empty. === Noncompliant code example [source,csharp] ---- public Result[] GetResults() { return null; // Noncompliant } public IEnumerable GetResults(bool condition) { var results = GenerateResults(); return condition ? results : null; // Noncompliant } public IEnumerable GetResults() => null; // Noncompliant public IEnumerable Results { get { return default(IEnumerable); // Noncompliant } } public IEnumerable Results => default; // Noncompliant ---- === Compliant solution [source,csharp] ---- public Result[] GetResults() { return new Result[0]; } public IEnumerable GetResults(bool condition) { var results = GenerateResults(); return condition ? results : Enumerable.Empty(); } public IEnumerable GetResults() => Enumerable.Empty(); public IEnumerable Results { get { return Enumerable.Empty(); } } public IEnumerable Results => Enumerable.Empty(); ---- === Exceptions Although ``++string++`` is a collection, the rule won't report on it. ifdef::env-github,rspecator-view[] ''' == Implementation Specification (visible only on this page) include::../message.adoc[] ''' == Comments And Links (visible only on this page) include::../comments-and-links.adoc[] endif::env-github,rspecator-view[]