From 8f9f12cd16c712ab3ed5e94a858978cc9534bc6e Mon Sep 17 00:00:00 2001 From: Rex Jaeschke Date: Mon, 14 Sep 2026 11:16:50 -0400 Subject: [PATCH 1/2] Fix Attribute name usage --- standard/classes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/standard/classes.md b/standard/classes.md index ce156aa8d..42ad23b5b 100644 --- a/standard/classes.md +++ b/standard/classes.md @@ -3002,7 +3002,7 @@ When a method declaration includes an `extern` modifier, the method is said to b The mechanism by which linkage to an external method is achieved is implementation-defined. -> *Example*: The following example demonstrates the use of the `extern` modifier and the `DllImport` attribute: +> *Example*: The following example demonstrates the use of the `extern` modifier and `DllImportAttribute`: > > > ```csharp From 8413106cc14a0dab8fdc5c510406b8487037e2ae Mon Sep 17 00:00:00 2001 From: Rex Jaeschke Date: Mon, 14 Sep 2026 12:27:25 -0400 Subject: [PATCH 2/2] remove explicit namespace --- standard/attributes.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/standard/attributes.md b/standard/attributes.md index d7fd3efc8..5a19e70dc 100644 --- a/standard/attributes.md +++ b/standard/attributes.md @@ -800,7 +800,7 @@ If more than one caller-info attribute is specified on a given parameter, they a #### 23.5.6.2 The CallerLineNumber attribute -The attribute `System.Runtime.CompilerServices.CallerLineNumberAttribute` is allowed on optional parameters when there is a standard implicit conversion ([§10.4.2](conversions.md#1042-standard-implicit-conversions)) from the constant value `int.MaxValue` to the parameter’s type. This ensures that any non-negative line number up to that value can be passed without error. +The attribute `CallerLineNumberAttribute` is allowed on optional parameters when there is a standard implicit conversion ([§10.4.2](conversions.md#1042-standard-implicit-conversions)) from the constant value `int.MaxValue` to the parameter’s type. This ensures that any non-negative line number up to that value can be passed without error. If a function invocation from a location in source code omits an optional parameter with the `CallerLineNumberAttribute`, then a numeric literal representing that location’s line number is used as an argument to the invocation instead of the default parameter value. @@ -810,7 +810,7 @@ The line number may be affected by `#line` directives ([§6.5.8](lexical-structu #### 23.5.6.3 The CallerFilePath attribute -The attribute `System.Runtime.CompilerServices.CallerFilePathAttribute` is allowed on optional parameters when there is a standard implicit conversion ([§10.4.2](conversions.md#1042-standard-implicit-conversions)) from `string` to the parameter’s type. +The attribute `CallerFilePathAttribute` is allowed on optional parameters when there is a standard implicit conversion ([§10.4.2](conversions.md#1042-standard-implicit-conversions)) from `string` to the parameter’s type. If a function invocation from a location in source code omits an optional parameter with the `CallerFilePathAttribute`, then a string literal representing that location’s file path is used as an argument to the invocation instead of the default parameter value. @@ -820,7 +820,7 @@ The file path may be affected by `#line` directives ([§6.5.8](lexical-structure #### 23.5.6.4 The CallerMemberName attribute -The attribute `System.Runtime.CompilerServices.CallerMemberNameAttribute` is allowed on optional parameters when there is a standard implicit conversion ([§10.4.2](conversions.md#1042-standard-implicit-conversions)) from `string` to the parameter’s type. +The attribute `CallerMemberNameAttribute` is allowed on optional parameters when there is a standard implicit conversion ([§10.4.2](conversions.md#1042-standard-implicit-conversions)) from `string` to the parameter’s type. If a function invocation from a location within the body of a function member or within an attribute applied to the function member itself or its return type, parameters or type parameters in source code omits an optional parameter with the `CallerMemberNameAttribute`, then a string literal representing the name of that member is used as an argument to the invocation instead of the default parameter value. @@ -1070,7 +1070,7 @@ Specifies that a nullable argument will not be `null` when the method returns th Specifies the parameter representing the `CancellationToken` for an asynchronous iterator ([§15.15](classes.md#1515-synchronous-and-asynchronous-iterators)). The argument for this parameter shall be combined with the argument passed to `IAsyncEnumerable.GetAsyncEnumerator(CancellationToken)`. This combined token shall be polled by `IAsyncEnumerator.MoveNextAsync()` ([§15.15.5.2](classes.md#151552-advance-the-enumerator)). The tokens shall be combined into a single token as if by `CancellationToken.CreateLinkedTokenSource` and its `Token` property. The combined token will be canceled if either of the two source tokens are canceled. The combined token is seen as the argument to the asynchronous iterator method ([§15.15](classes.md#1515-synchronous-and-asynchronous-iterators)) in the body of that method. -It is an error if the `System.Runtime.CompilerServices.EnumeratorCancellationAttribute` attribute is applied to more than one parameter. The compiler may produce a warning if: +It is an error if the `EnumeratorCancellationAttribute` attribute is applied to more than one parameter. The compiler may produce a warning if: - `EnumeratorCancellationAttribute` is applied to a parameter of a type other than `CancellationToken`, - or if `EnumeratorCancellationAttribute` is applied to a parameter on a method that is not an asynchronous iterator ([§15.15](classes.md#1515-synchronous-and-asynchronous-iterators)),