dotnet / dotnet/dotnet-api-docs

Using a ValueTuple to Create Hash Code

Offen
#863 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area-System.Runtime dotnet-api/prod Pri2 untriaged
Vorherrschende Sprache
C#
Sterne
949
Forks
1.7k
Ø Merge
2 T. 19 Std.
Gemergte PRs (30 T.)
52

Beschreibung

Can we use a ValueTuple for creating a hash code. So instead of
```
return Tuple.Create(x, y).GetHashCode();
```
```
return (x,y).GetHashCode();
```

---
#### Document Details

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

* ID: 4e3cf3f3-9e8f-1c90-968b-a96ef6cb9d34
* Version Independent ID: 5f0e9dde-3253-ad99-c858-f061e61daa3f
* Content: [Object.GetHashCode Method (System)](https://docs.microsoft.com/en-us/dotnet/api/system.object.gethashcode?view=netframework-4.7.2)
* Content Source: [xml/System/Object.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System/Object.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Öffne xml/System/Object.xml und lies den im Issue verlinkten Dokumentationseintrag zu Object.GetHashCode. Prüfe, wo das Beispiel Tuple.Create(x, y) vorkommt, aktualisiere das dokumentierte Beispiel, sodass es die angeforderte ValueTuple-Form widerspiegelt, und bestätige, dass die generierte Object.GetHashCode-Seite die beabsichtigte Formulierung zeigt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp
Bereich
documentation
Issue-Typ
Dokumentation
Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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