Skip to content

Commit bd25ce4

Browse files
authored
fix section heading ref
1 parent ede694a commit bd25ce4

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
@@ -3452,7 +3452,7 @@ In a *ref_property_body* an expression body consisting of `=>` followed by `ref`
34523452
34533453
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.
34543454

3455-
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.
3455+
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.
34563456

34573457
> *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*
34583458

0 commit comments

Comments
 (0)