Skip to content

Commit 96189cd

Browse files
RexJaeschkeBillWagner
authored andcommitted
fix section heading ref
1 parent bd9c014 commit 96189cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

standard/classes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3486,7 +3486,7 @@ In a *ref_property_body* an expression body consisting of `=>` followed by `ref`
34863486
34873487
When a property declaration includes an `extern` modifier, the property is said to be an ***external property***. Because an external property declaration provides no actual implementation, each of the *accessor_body*s in its *accessor_declarations* shall be a semicolon.
34883488

3489-
The modifier `required` indicates the instance member being declared is required to be set during object initialization, which forces the instance creator to provide an initial value for the member in an object initializer at the creation site. (See [§12.8.20](expressions.md#12820-default-value-expressions) and §SetsRequiredMembersAttribute for exemptions to this requirement.) A required member shall not be static. A required member shall be at least as accessible as its containing type.
3489+
The modifier `required` indicates the instance member being declared is required to be set during object initialization, which forces the instance creator to provide an initial value for the member in an object initializer at the creation site. (See [§12.8.20](expressions.md#12820-default-value-expressions) and §SetsRequiredMembers for exemptions to this requirement.) A required member shall not be static. A required member shall be at least as accessible as its containing type.
34903490

34913491
> *Note*: Although a required member declaration may include an initializer (*property_initializer* for a property, *variable_initializer* for a field), ordinarily, that initializer serves no purpose, as the instance creator is required to provide an initial value for that member anyway. However, if a constructor is decorated with the `SetsRequiredMembers` attribute the compiler assumes that member has been initialized correctly, and will not require an explicit initializer by the instance creator, resulting in the member’s initial value being that of its initializer, if one is present. *end note*
34923492

0 commit comments

Comments
 (0)