From f1fac84d3b7164263da7d10ad881635c99510910 Mon Sep 17 00:00:00 2001 From: Rex Jaeschke Date: Wed, 25 Oct 2023 11:05:29 -0400 Subject: [PATCH 1/2] reverse some V7 edits --- standard/classes.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/standard/classes.md b/standard/classes.md index 6d81a34ae..b316600e7 100644 --- a/standard/classes.md +++ b/standard/classes.md @@ -4188,12 +4188,12 @@ An *indexer_declaration* may include a set of *attributes* ([§22](attributes.md Indexer declarations are subject to the same rules as method declarations ([§15.6](classes.md#156-methods)) with regard to valid combinations of modifiers, with the one exception being that the `static` modifier is not permitted on an indexer declaration. +The modifiers `virtual`, `override`, and `abstract` are mutually exclusive except in one case. The `abstract` and `override` modifiers may be used together so that an abstract indexer can override a virtual one. + The *type* of an indexer declaration specifies the element type of the indexer introduced by the declaration. > *Note*: As indexers are designed to be used in array element-like contexts, the term *element type* as defined for an array is also used with an indexer. *end note* -The *formal_parameter_list* specifies the parameters of the indexer. The formal parameter list of an indexer corresponds to that of a method ([§15.6.2](classes.md#1562-method-parameters)), except that at least one parameter shall be specified, and that the `this`, `out`, and `ref` parameter modifiers are not permitted. - Unless the indexer is an explicit interface member implementation, the *type* is followed by the keyword `this`. For an explicit interface member implementation, the *type* is followed by an *interface_type*, a “`.`”, and the keyword `this`. Unlike other members, indexers do not have user-defined names. The *formal_parameter_list* specifies the parameters of the indexer. The formal parameter list of an indexer corresponds to that of a method ([§15.6.2](classes.md#1562-method-parameters)), except that at least one parameter shall be specified, and that the `this`, `ref`, and `out` parameter modifiers are not permitted. @@ -4363,7 +4363,7 @@ Indexers and properties are very similar in concept, but differ in the following Aside from these differences, all rules defined in [§15.7.3](classes.md#1573-accessors), [§15.7.5](classes.md#1575-accessibility) and [§15.7.6](classes.md#1576-virtual-sealed-override-and-abstract-accessors) apply to indexer accessors as well as to property accessors. -*Note*: This replacing of property/properties with indexer/indexers when reading [§15.7.3](classes.md#1573-accessors), [§15.7.5](classes.md#1575-accessibility) and [§15.7.6](classes.md#1576-virtual-sealed-override-and-abstract-accessors) applies to defined terms as well. For example *read-write property* becomes *read-write-indexer*. *end note* +This replacing of property/properties with indexer/indexers when reading [§15.7.3](classes.md#1573-accessors), [§15.7.5](classes.md#1575-accessibility) and [§15.7.6](classes.md#1576-virtual-sealed-override-and-abstract-accessors) applies to defined terms as well. Specifically, *read-write property* becomes ***read-write indexer***, *read-only property* becomes ***read-only indexer***, and *write-only property* becomes ***write-only indexer***. ## 15.10 Operators From f21753ce9fa7e222a95a8b54365536bd8d38c912 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Wed, 1 Nov 2023 20:35:04 +0000 Subject: [PATCH 2/2] Update standard/classes.md --- standard/classes.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/standard/classes.md b/standard/classes.md index b316600e7..0b5e3e49b 100644 --- a/standard/classes.md +++ b/standard/classes.md @@ -4188,8 +4188,6 @@ An *indexer_declaration* may include a set of *attributes* ([§22](attributes.md Indexer declarations are subject to the same rules as method declarations ([§15.6](classes.md#156-methods)) with regard to valid combinations of modifiers, with the one exception being that the `static` modifier is not permitted on an indexer declaration. -The modifiers `virtual`, `override`, and `abstract` are mutually exclusive except in one case. The `abstract` and `override` modifiers may be used together so that an abstract indexer can override a virtual one. - The *type* of an indexer declaration specifies the element type of the indexer introduced by the declaration. > *Note*: As indexers are designed to be used in array element-like contexts, the term *element type* as defined for an array is also used with an indexer. *end note*