Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .openpublishing.redirection.csharp.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"redirections": [
{
"source_path_from_root": "/docs/csharp/fundamentals/types/anonymous-types.md",
"redirect_url": "/dotnet/csharp/fundamentals/types/tuples"
},
{
"source_path_from_root": "/docs/csharp/fundamentals/types/namespaces.md",
"redirect_url": "/dotnet/csharp/fundamentals/program-structure/namespaces"
Expand Down Expand Up @@ -3067,7 +3071,7 @@
},
{
"source_path_from_root": "/docs/csharp/programming-guide/classes-and-structs/anonymous-types.md",
"redirect_url": "/dotnet/csharp/fundamentals/types/anonymous-types"
"redirect_url": "/dotnet/csharp/fundamentals/types/tuples"
},
{
"source_path_from_root": "/docs/csharp/programming-guide/classes-and-structs/classes.md",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ A typical call site will look like:
:::code language="csharp" source="snippets/diagnosticsource/csharp/Program.cs" id="Snippet3":::

Every event has a `string` name (for example, `RequestStart`), and exactly one `object` as a payload.
If you need to send more than one item, you can do so by creating an `object` with properties to represent all its information. C#'s [anonymous type](../../csharp/fundamentals/types/anonymous-types.md)
If you need to send more than one item, you can do so by creating an `object` with properties to represent all its information. C#'s [anonymous type](../../csharp/fundamentals/types/tuples.md)
feature is typically used to create a type to pass 'on the fly', and makes this scheme very
convenient. At the instrumentation site, you must guard the call to `Write()` with an `IsEnabled()` check on
the same event name. Without this check, even when the instrumentation is inactive, the rules
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/fundamentals/object-oriented/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ You can instantiate and initialize class or struct objects, and collections of o

## Anonymous Types

In situations where it isn't convenient or necessary to create a named class you use anonymous types. Named data members define anonymous types. For more information, see [Anonymous types](../types/anonymous-types.md).
In situations where it isn't convenient or necessary to create a named class, you can use anonymous types or [tuples](../types/tuples.md). Named data members define anonymous types. Tuples are the preferred choice for new code because they offer better performance and deconstruction support. For more information, see [Tuples and deconstruction](../types/tuples.md).

## Extension Members

Expand Down
141 changes: 0 additions & 141 deletions docs/csharp/fundamentals/types/anonymous-types.md

This file was deleted.

Loading
Loading