Merged
Conversation
1. **Create `fundamentals/types/tuples.md`** — New "Tuples and deconstruction" article replacing `anonymous-types.md` - Content: tier tip, tuple declaration with named elements, inferred element names (C# 7.1), tuples as return types, tuple deconstruction (tuple-specific parts merged from `deconstruct.md`), discards (brief, link to `discards.md`), tuple comparison `==`/`!=` (C# 7.3), `with` on tuples, brief "prefer tuples over anonymous types" note linking to language reference - Does NOT duplicate: full syntax reference (stays in `value-tuples.md`), user-defined `Deconstruct`/extension methods (stays in `deconstruct.md`) - Frontmatter: `ms.topic: concept`, `ai-usage: ai-assisted`, no `f1_keywords`/`helpviewer_keywords` 1. **Create `snippets/tuples/` directory** — `tuples.csproj` (net10.0) + `Program.cs` with all snippet regions. Uses Everyday C# features. *parallel with step 1* 1. **Delete `anonymous-types.md`** and **`snippets/anonymous-types/`** — replaced by tuples. *depends on steps 1–2*
1. **Revise `interfaces.md`** — Remove `helpviewer_keywords`, add `ms.topic: concept` + `ai-usage: ai-assisted` + tier tip. Keep: declaring, implementing (implicit/explicit), interface inheritance, internal interfaces. Trim: default interface members → link to advanced; static abstract → brief mention linking out. Update summary bullets. 1. **Update `snippets/interfaces/`** — `.csproj` to net10.0, modernize `interfaces.cs` with latest features. *depends on step 4*
1. **Revise `generics.md`** — Remove `f1_keywords`/`helpviewer_keywords`, add `ms.topic: concept` + `ai-usage: ai-assisted` + tier tip. Reframe around **consuming** generics (`List<T>`, `Dictionary<TKey,TValue>`, `Task<T>`, `Func<T,TResult>`). Add: type inference, basic constraints (`class`/`struct`/`new()`/base type, brief `Enum`/`Delegate`/`unmanaged`), collection expressions (C# 12) with spread `..`, dictionary expressions (C# 14), co-/contra-variance at consumption level (link to `covariance-contravariance/` for depth). Demote `GenericList<T>` authoring example to secondary. 1. **Update `snippets/generics/`** — `.csproj` to net10.0, rewrite `Program.cs` with consuming-focused examples. *depends on step 6*
1. **Update `docs/csharp/toc.yml`** — Change "Tuples and anonymous types" → "Tuples and deconstruction" pointing to `tuples.md`. Remove `# TODO: tuples` comment. 1. **Update `.openpublishing.redirection.csharp.json`** — Modify existing redirect (`programming-guide/.../anonymous-types.md` → `/dotnet/csharp/fundamentals/types/tuples`). Add new redirect (`fundamentals/types/anonymous-types.md` → `/dotnet/csharp/fundamentals/types/tuples`). Sort alphabetically. 1. **Update cross-references** — Fix links to `anonymous-types.md` in `csharp-version-history.md` and `value-tuples.md` to point to `tuples.md` or language reference.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restructures Everyday C# “type system” documentation by introducing a dedicated tuples article, refocusing interfaces and generics articles for fundamentals readers, and updating cross-references, snippets, TOC, and redirects.
Changes:
- Replaces the former
anonymous-types.mdfundamentals article with a newtuples.mdfocused on tuples and deconstruction, and updates redirects/TOC. - Revises
interfaces.mdandgenerics.mdto emphasize common usage patterns, with refreshed snippets. - Updates many docs to repoint anonymous-types references, plus related redirects.
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 30 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/standard/linq/project-anonymous-type.md | Updates “Anonymous Types” links to the new fundamentals target. |
| docs/standard/linq/concepts-terminology-functional-transformation.md | Updates anonymous-types reference link in terminology. |
| docs/standard/base-types/choosing-between-anonymous-and-tuple.md | Updates references to fundamentals anonymous-types page. |
| docs/fundamentals/code-analysis/style-rules/ide0050.md | Updates anonymous-types links referenced by the analyzer rule. |
| docs/fundamentals/code-analysis/style-rules/ide0037.md | Updates anonymous-types link in analyzer rule overview. |
| docs/fsharp/language-reference/anonymous-records.md | Updates link for C# anonymous types interop section. |
| docs/csharp/whats-new/csharp-version-history.md | Updates “Anonymous types” link in C# 3.0 feature list. |
| docs/csharp/toc.yml | Replaces the “Tuples and anonymous types” TOC entry with “Tuples and deconstruction”. |
| docs/csharp/programming-guide/classes-and-structs/object-and-collection-initializers.md | Updates link target for anonymous types reference. |
| docs/csharp/programming-guide/classes-and-structs/implicitly-typed-local-variables.md | Updates anonymous types links to new fundamentals target. |
| docs/csharp/programming-guide/classes-and-structs/how-to-use-implicitly-typed-local-variables-and-arrays-in-a-query-expression.md | Updates anonymous types reference link. |
| docs/csharp/programming-guide/classes-and-structs/how-to-return-subsets-of-element-properties-in-a-query.md | Updates “Anonymous Types” link in “See also”. |
| docs/csharp/programming-guide/classes-and-structs/access-modifiers.md | Updates “Anonymous types” link in “See also”. |
| docs/csharp/misc/cs0833.md | Updates “Anonymous Types” link in “See also”. |
| docs/csharp/misc/cs0746.md | Updates “Anonymous Types” link in “See also”. |
| docs/csharp/linq/standard-query-operators/join-operations.md | Updates “Anonymous types” link in “See also”. |
| docs/csharp/linq/standard-query-operators/index.md | Updates “Anonymous Types” link in “See also”. |
| docs/csharp/linq/get-started/features-that-support-linq.md | Updates “anonymous type” link in the anonymous types section. |
| docs/csharp/language-reference/statements/declarations.md | Updates anonymous types link in implicitly-typed locals discussion. |
| docs/csharp/language-reference/operators/with-expression.md | Updates anonymous types link in operand description. |
| docs/csharp/language-reference/operators/new-operator.md | Updates anonymous types link in “Instantiation of anonymous types”. |
| docs/csharp/language-reference/keywords/select-clause.md | Updates “Anonymous Types” link in “See also”. |
| docs/csharp/language-reference/builtin-types/value-tuples.md | Removes link to removed anonymous-types fundamentals page. |
| docs/csharp/fundamentals/types/tuples.md | Adds new fundamentals article for tuples and deconstruction. |
| docs/csharp/fundamentals/types/snippets/tuples/tuples.csproj | Retargets tuples snippet project to net10.0. |
| docs/csharp/fundamentals/types/snippets/tuples/Program.cs | Adds new tuples/deconstruction/equality/with/dictionary examples. |
| docs/csharp/fundamentals/types/snippets/interfaces/interfaces.csproj | Retargets interfaces snippet project to net10.0. |
| docs/csharp/fundamentals/types/snippets/interfaces/interfaces.cs | Reworks interface examples (implicit/explicit impl, inheritance, internal interfaces). |
| docs/csharp/fundamentals/types/interfaces.md | Rewrites the interfaces fundamentals article and references new snippets. |
| docs/csharp/fundamentals/types/snippets/generics/Program.cs | Reworks generics samples toward “consuming generics” and newer syntax examples. |
| docs/csharp/fundamentals/types/snippets/generics/generics.csproj | Retargets generics snippet project to net10.0 and removes explicit startup object. |
| docs/csharp/fundamentals/types/snippets/anonymous-types/Program.cs | Removes old anonymous-types snippet program (file deleted). |
| docs/csharp/fundamentals/types/generics.md | Rewrites generics fundamentals article and references new snippets. |
| docs/csharp/fundamentals/types/anonymous-types.md | Removes old fundamentals anonymous types article (file deleted). |
| docs/csharp/fundamentals/object-oriented/index.md | Updates anonymous types section to point to tuples article. |
| docs/core/diagnostics/diagnosticsource-diagnosticlistener.md | Updates anonymous-type link in DiagnosticSource payload guidance. |
| .openpublishing.redirection.csharp.json | Adds/updates redirects from removed anonymous-types pages to the new tuples page. |
Comments suppressed due to low confidence (1)
docs/csharp/misc/cs0833.md:42
- The “Anonymous Types” reference now links to
fundamentals/types/tuples.md, but this compiler error is specifically about anonymous types. Link to anonymous-type documentation (or add an anchor/section in the destination) so the reference matches the error topic.
## See also
- [Anonymous Types](../fundamentals/types/tuples.md)
docs/csharp/fundamentals/types/snippets/interfaces/interfaces.cs
Outdated
Show resolved
Hide resolved
docs/csharp/fundamentals/types/snippets/interfaces/interfaces.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…agner/docs into tuples-interfaces-generics
Recreate the anonymous types article in the programming guide section.
Update links to the new anonymous types article, or both the tuples and anonymous types article.
Member
Author
|
@adegeo This is ready for final review. |
gewarren
approved these changes
Apr 10, 2026
docs/csharp/programming-guide/classes-and-structs/anonymous-types.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #51994
Replace
anonymous-types.mdwith a dedicatedtuples.mdfocused on tuples and deconstruction. Reviseinterfaces.mdto trim advanced content (default interface members, static abstract members). Revisegenerics.mdto shift from authoring to consuming generics and add collection expressions, dictionary expressions, spread, and co-/contra-variance. Update snippets, toc.yml, and redirects.Internal previews
Toggle expand/collapse
newoperator creates a new instance of a type