dotnet / dotnet/dotnet-api-docs

Doc needs more info on null data

Open
#1,839 0 comments 0 reactions 0 assignees View on GitHub
area-System.Linq dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

For instance, if I use a Where<>() clause and it finds no matching items in a collection, does it return null or an empty collection? If I chain a .ToArray() on to the Where() clause for immediate evaluation will it throw a null argument exception or will it just return null or the empty collection?

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 90e254e7-ea82-c901-3b99-fea65c947aac
* Version Independent ID: 5302bfde-2fa0-4275-e38a-4fadbf5fc1c3
* Content: [Enumerable.ToArray(IEnumerable<TSource>) Method (System.Linq)](https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable.toarray?view=netframework-4.7.2)
* Content Source: [xml/System.Linq/Enumerable.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Linq/Enumerable.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.