diff --git a/docs/csharp/language-reference/attributes/pseudo-attributes.md b/docs/csharp/language-reference/attributes/pseudo-attributes.md index 6634c52d8f1b5..ff9d7b692cb96 100644 --- a/docs/csharp/language-reference/attributes/pseudo-attributes.md +++ b/docs/csharp/language-reference/attributes/pseudo-attributes.md @@ -1,6 +1,6 @@ --- title: "Attributes interpreted by the compiler: Pseudo-attributes" -ms.date: 01/2/2025 +ms.date: 01/28/2025 description: "Learn about attributes you can add to code that are written to IL as modifiers. These custom attributes aren't emitted as attributes in the compiled output." --- # Custom attributes that generate flags or options in the Intermediate Language (IL) output @@ -16,7 +16,6 @@ You add these attributes to your code for the compiler to emit a specified Inter | | `flag` | Constructor arguments specify specific named flags such as `aggressiveinlining` or `forwardref`. These flags also specify the `native`, `managed`, or `optil` modifiers for the field. | | | `notserialized` | | | | `[opt]` | | -| | `[out]` | | | | `preservesig` | | | | `serializable` | | | | `auto`, `sequential`, or `explicit` | Layout options can be set using the parameters. | @@ -27,11 +26,12 @@ Some of these custom attributes are applied using other C# syntax rather than ad | Attribute | Comments | |--------------------------------------------------------------------------------------------------|----------| | | Specifies the default value for the parameter. Use the [default parameter syntax](../../methods.md#optional-parameters-and-arguments). | -| | Specifies the IL `[in]` modifier. Use the [`in`](../keywords/method-parameters.md#in-parameter-modifier) or [`ref readonly`](../keywords/method-parameters.md#ref-readonly-modifier). | +| | Specifies the IL `[in]` modifier. Use the [`in`](../keywords/method-parameters.md#in-parameter-modifier) or [`ref readonly`](../keywords/method-parameters.md#ref-readonly-modifier) modifiers. | +| | Specifies the IL `[out]` modifier. Use the [`out`](../keywords/method-parameters.md#out-parameter-modifier) modifier. | | | Specifies the IL `specialname` modifier. The compiler automatically adds this modifier for methods that require it. | -| | This attribute is required for the `delegate*` feature. The compiler adds it to any [`delegate*`](../unsafe-code.md#function-pointers) that requires its use. | +| | This attribute is required for the `delegate*` feature. The compiler adds it to any [`delegate*`](../unsafe-code.md#function-pointers) that requires its use. However, you must add this attribute to any method declaration when that method is assigned to a function pointer. | -The following custom attributes are generally disallowed in C# source. They're listed here to aid library authors who use reflection, and to ensure you don't create custom attributes with the same name. +The following attributes are generally disallowed in C# source. They're listed here to aid library authors who use reflection, and to ensure you don't create custom attributes with the same fully qualified name. | Attribute | Comments | |--------------------------------------------------------------------------------------------------|---------| @@ -52,4 +52,4 @@ The following custom attributes are generally disallowed in C# source. They're l | | This attribute indicates that the `required` modifier was placed on a member declaration. It's the encoding of the [required members](../keywords/required.md) language feature. | | | This attribute encodes tuple element names used in signatures. | -In addition, the compiler can generate a declaration for other attributes used internally. The compiler generates these in the namespace for its own use. Some aren't in the .NET Runtime libraries. Instead, the compiler synthesizes a definition for an `internal` type declaration in any assembly where the attribute is needed. +In addition, the compiler can generate a declaration for other attributes used internally. The compiler generates these attributes in the namespace for its own use. Some aren't in the .NET Runtime libraries. Instead, the compiler synthesizes a definition for an `internal` type declaration in any assembly where the attribute is needed.