You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: standard/basic-concepts.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -402,7 +402,7 @@ As described in [§7.4](basic-concepts.md#74-members), all members of a base cla
402
402
403
403
### 7.5.4 Protected access
404
404
405
-
When a `protected` or `private protected` instance member is accessed outside the program text of the class in which it is declared, and when a `protected internal` instance member is accessed outside the program text of the program in which it is declared, the access shall take place within a class declaration that derives from the class in which it is declared. Furthermore, the access is required to take place *through* an instance of that derived class type or a class type constructed from it. This restriction prevents one derived class from accessing protected members of other derived classes, even when the members are inherited from the same base class. Instance interface members defined with `protected` or `private protected` access cannot be accessed from a `class` or `struct` that implements that interface; thesecanbeaccessedonlyfromderivedinterfaces. However, `class` and `struct` types can override `protected` instance members declared in an interface they implement.
405
+
When a `protected` or `private protected` instance member is accessed outside the program text of the class in which it is declared, and when a `protected internal` instance member is accessed outside the program text of the program in which it is declared, the access shall take place within a class declaration that derives from the class in which it is declared. Furthermore, the access is required to take place *through* an instance of that derived class type or a class type constructed from it. This restriction prevents one derived class from accessing protected members of other derived classes, even when the members are inherited from the same base class. Instance interface members defined with `protected` or `private protected` access cannot be accessed from a `class` or `struct` that implements that interface; thesecanbeaccessedonlyfromderivedinterfaces. However, `class` and `struct` types can implement `protected` instance members declared in an interface they implement.
406
406
407
407
Let `B` be a base classthat declares a protected instance member `M`, and let `D` be a class that derives from `B`. Within the *class_body* of `D`, access to `M` can take one of the following forms:
Copy file name to clipboardExpand all lines: standard/interfaces.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -476,7 +476,7 @@ Interface indexers are declared using *indexer_declaration*s ([§15.9](classes.m
476
476
477
477
This clause augments the description of *operator_declaration* members in classes [§15.10](classes.md#1510-operators) for operators declared in interfaces.
478
478
479
-
For an *operator_declaration* in an interface the *operator_body* may only be a block body ([§15.6.1](classes.md#1561-general)) or an expression body ([§15.6.1](classes.md#1561-general)).
479
+
For an *operator_declaration* in an interface the *operator_body* shall only be a block body ([§15.6.1](classes.md#1561-general)) or an expression body ([§15.6.1](classes.md#1561-general)).
480
480
481
481
It is a compile-time error for an interface to declare a conversion, equality, or inequality operator.
482
482
@@ -1066,7 +1066,7 @@ When a generic method implicitly implements an interface method, the constraints
Aclassorstructshallprovideimplementationsforallabstractmembersoftheinterfacesthatarelistedinthebaseclasslistoftheclassorstructwhichdonothaveareachableimplementation; whereanimplementationcanbecomeunreachableduetoreabstraction [§19.4.3](interfaces.md#1943-interface-methods). Theprocessoflocatingimplementationsofinterfacemembers in an implementing class or struct is known as ***interface mapping***.
1070
1070
1071
1071
Interface mapping for a class or struct `C` locates an implementation for each member of each interface specified in the base class list of `C`. The implementation of a particular interface member `I.M`, where `I` is the interface in which the member `M` is declared, is determined by examining each class, interface, or struct `S`, starting with `C` and repeating for each successive base class and implemented interface of `C`, until a match is located:
1072
1072
@@ -1463,7 +1463,7 @@ When a class implements an interface, it implicitly also implements all that int
1463
1463
1464
1464
### 19.6.8 Abstract classes and interfaces
1465
1465
1466
-
Likeanon-abstract class, an abstract classshall provide implementations of all abstract members of the interfaces that are listed in the base class list of the class which are not implemented in any of those listed interfaces. However, an abstract class is permitted to map interface methods onto abstract methods.
1466
+
Likeanon-abstract class, an abstract classshall provide implementations for all abstract members of the interfaces that are listed in the base class list of the class or struct which do not have a reachable implementation; whereanimplementationcanbecomeunreachableduetoreabstraction [§19.4.3](interfaces.md#1943-interface-methods). However, anabstractclassis permitted to map interface methods onto abstract methods.
0 commit comments