Skip to content

Commit 293ee42

Browse files
Nigel-Ecmajnm2
authored andcommitted
Update standard/classes.md
Co-authored-by: Joseph Musser <[email protected]>
1 parent d013bfa commit 293ee42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

standard/classes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2751,7 +2751,7 @@ A compile-time error occurs unless all of the following are true for an override
27512751
- The override declaration and the overridden base method have the same declared accessibility. In other words, an override declaration cannot change the accessibility of the virtual method. However, if the overridden base method is protected internal and it is declared in a different assembly than the assembly containing the override declaration then the override declaration’s declared accessibility shall be protected.
27522752
- A *type_parameter_constraints_clause* may only consist of the `class` or `struct` *primary_constraint*s applied to *type_parameter*s which are known according to the inherited constraints to be either reference or value types respectively. Any type of the form `T?` in the overriding method’s signature, where `T` is a type parameter, is interpreted as follows:
27532753
- If a `class` constraint is added for type parameter `T` then `T?` is a nullable reference type; otherwise
2754-
- If either there is no added constraint, or a `struct` is added, for the type parameter `T` then `T?` is a nullable value type.
2754+
- If either there is no added constraint, or a `struct` constraint is added, for the type parameter `T` then `T?` is a nullable value type.
27552755
27562756
> *Example*: The following demonstrates how the overriding rules work for generic classes:
27572757
>

0 commit comments

Comments
 (0)