dotnet / dotnet/dotnet-api-docs

The ReferenceEqualityComparer.Instance property is incorrectly shown as nullable

Offen
#4,875 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area-System.Collections Pri3 untriaged
Vorherrschende Sprache
C#
Sterne
949
Forks
1.7k
Ø Merge
3 T. 27 Min.
Gemergte PRs (30 T.)
49

Beschreibung

https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.referenceequalitycomparer.instance?view=net-5.0:

> ```cs
> public static System.Collections.Generic.ReferenceEqualityComparer? Instance { get; }
> ```

Having this property be nullable makes no sense. Docs tooling bug maybe? The .NET Core source shows that it's not nullable:

https://github.com/dotnet/runtime/blob/v5.0.0-rc.1.20451.14/src/libraries/Common/src/System/Collections/Generic/ReferenceEqualityComparer.cs#L30

```cs
///
/// Gets the singleton instance.
///
public static ReferenceEqualityComparer Instance { get; } = new ReferenceEqualityComparer();
```

https://github.com/dotnet/runtime/blob/v5.0.0-rc.1.20451.14/src/libraries/System.Collections/ref/System.Collections.cs#L418

```cs
public static System.Collections.Generic.ReferenceEqualityComparer Instance { get { throw null; } }
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Compare the API page's nullable ReferenceEqualityComparer.Instance signature with the runtime declarations in src/libraries/Common/src/System/Collections/Generic/ReferenceEqualityComparer.cs and src/libraries/System.Collections/ref/System.Collections.cs. Start by checking how the documentation tooling derives the signature. Done means the generated API reference shows the property as non-nullable.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp
Bereich
documentation
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.