Skip to content

Commit 664eecc

Browse files
committed
build warnings
1 parent cc5295c commit 664eecc

File tree

3 files changed

+6
-48
lines changed

3 files changed

+6
-48
lines changed

docs/csharp/language-reference/compiler-messages/explicit-interface-errors.md renamed to docs/csharp/language-reference/compiler-messages/interface-implementation-errors.md

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ You can correct these errors using the following techniques:
122122
- Ensure that parameter types in the implementing method exactly match the parameter types declared in the interface member (**CS9333**). Each parameter must have the identical type in the same position as specified in the interface declaration, as parameter types are fundamental components of the method signature that the compiler uses to match implementations to interface members.
123123
- Add an `init` accessor to the implementing property when the interface property declares an `init` setter (**CS8854**). The `init` keyword allows property initialization during object construction while preventing modification afterward, and the implementing property must provide this same initialization-only behavior to satisfy the interface contract.
124124

125-
For more information, see [Interfaces](../../fundamentals/types/interfaces.md), [Properties](../../programming-guide/classes-and-structs/properties.md), and [Init-only setters](../../whats-new/csharp-9.md#init-only-setters).
125+
For more information, see [Interfaces](../../fundamentals/types/interfaces.md), [Properties](../../programming-guide/classes-and-structs/properties.md), and [Init-only setters](../keywords/init.md).
126126

127127
## Missing or incomplete implementations
128128

@@ -214,7 +214,7 @@ You can correct these errors using the following techniques:
214214
- Provide an explicit implementation in the implementing class or struct that resolves the ambiguity between multiple default implementations (**CS8705**). This error typically occurs with diamond inheritance patterns where a class implements multiple interfaces that each provide default implementations for the same member. The compiler needs you to explicitly specify which implementation to use or provide your own implementation.
215215
- Restructure the interface hierarchy to avoid diamond inheritance conflicts where multiple interfaces provide default implementations for the same member (**CS8705**). By redesigning the interface relationships or consolidating the default implementations into a single interface, you can eliminate the ambiguity that prevents the compiler from determining the most specific implementation.
216216

217-
For more information, see [Interfaces](../../fundamentals/types/interfaces.md) and [Default Interface Methods](../../whats-new/csharp-8.md#default-interface-methods).
217+
For more information, see [Interfaces](../../fundamentals/types/interfaces.md) and [Default Interface Methods](../keywords/interface.md#default-interface-members).
218218

219219
## Special implementation restrictions
220220

@@ -228,45 +228,3 @@ You can correct this error using the following techniques:
228228
- Replace the `__arglist` parameter with a `params` array parameter for variable-length argument lists (**CS0630**). Unlike `__arglist`, the `params` keyword provides a type-safe mechanism for accepting variable numbers of arguments that is fully compatible with interface implementation and maintains the compile-time type safety that interfaces require.
229229

230230
For more information, see [Interfaces](../../fundamentals/types/interfaces.md) and [params keyword](../keywords/method-parameters.md#params-modifier).
231-
232-
233-
234-
235-
236-
237-
238-
239-
240-
241-
242-
243-
244-
245-
246-
247-
248-
249-
250-
251-
252-
253-
254-
255-
256-
257-
258-
259-
260-
261-
262-
263-
264-
265-
266-
267-
268-
269-
270-
271-
272-

docs/csharp/language-reference/toc.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,13 +515,13 @@ items:
515515
async, await,
516516
CS1983, CS1985, CS1986, CS1989, CS1991, CS1992, CS1994, CS1995, CS1996, CS1997,
517517
CS1998, CS4008, CS4009, CS4014, CS4032, CS4033, CS8892, CS9123, CS9330
518-
- name: Explicit interface implementation
519-
href: ./compiler-messages/explicit-interface-errors.md
518+
- name: Interface implementation
519+
href: ./compiler-messages/interface-implementation-errors.md
520520
displayName: >
521521
interface,
522522
CS0071, CS0106, CS0277, CS0425, CS0460, CS0470, CS0473, CS0531, CS0535, CS0538, CS0539, CS0540,
523523
CS0541, CS0550, CS0551, CS0630, CS0686, CS0736, CS0737, CS0738, CS8705, CS8707, CS8711, CS8854,
524-
CS9333, CS9334
524+
CS9333, CS9334
525525
- name: Reference parameters
526526
href: ./compiler-messages/ref-modifiers-errors.md
527527
displayName: >

docs/csharp/programming-guide/interfaces/explicit-interface-implementation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Explicit implementation is also used to resolve cases where two interfaces each
2828

2929
[!code-csharp[NameCollisions](~/samples/snippets/csharp/interfaces/ExplicitImplementation.cs#NameCollision)]
3030

31-
An explicit interface implementation doesn't have an access modifier since it isn't accessible as a member of the type it's defined in. Instead, it's only accessible when called through an instance of the interface. If you specify an access modifier for an explicit interface implementation, you get compiler error [CS0106](../../language-reference/compiler-messages/cs0106.md). For more information, see [`interface` (C# Reference)](../../language-reference/keywords/interface.md).
31+
An explicit interface implementation doesn't have an access modifier since it isn't accessible as a member of the type it's defined in. Instead, it's only accessible when called through an instance of the interface. If you specify an access modifier for an explicit interface implementation, you get compiler error [CS0106](../../language-reference/compiler-messages/interface-implementation-errors.md). For more information, see [`interface` (C# Reference)](../../language-reference/keywords/interface.md).
3232

3333
You can define an implementation for members declared in an interface. If a class inherits a method implementation from an interface, that method is only accessible through a reference of the interface type. The inherited member doesn't appear as part of the public interface. The following sample defines a default implementation for an interface method:
3434

0 commit comments

Comments
 (0)