Skip to content

ILight.Power() was typoed as ILight.PowerStatus. #45152

@BigSquareHasNoEdge

Description

@BigSquareHasNoEdge

Type of issue

Typo

Description

In this section, ILight was added Power() with default implementation:

public interface ILight
{
    //...
    public PowerStatus Power() => PowerStatus.NoPower;
}

However, the following sections are indicating it as PowerStatus.

Avoid overriding the same method ... an override of PowerStatus, ....

Both the diagram right below the above paragraph and the next paragraph after the diagram contain the same typo.

The preceding diagram illustrates the ambiguity. OverheadLight doesn't provide an implementation of ILight.PowerStatus. Both IBlinkingLight and ITimerLight provide overrides that are more specific. A call to ILight.PowerStatus on an instance of OverheadLight is ambiguous. You must add a new override in OverheadLight to resolve the ambiguity.

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/advanced-topics/interface-implementation/mixins-with-default-interface-methods

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/advanced-topics/interface-implementation/mixins-with-default-interface-methods.md

Document Version Independent Id

98229926-6c7a-3ad1-ab5c-86231253986c

Platform Id

5f097f47-9790-5a92-55f5-70776d1c799f

Article author

@BillWagner

Metadata

  • ID: 2c7899e8-3f01-41d2-137a-e334b73699a4
  • PlatformId: 5f097f47-9790-5a92-55f5-70776d1c799f
  • Service: dotnet-csharp
  • Sub-service: advanced-concepts

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    advanced-concepts/subsvcdotnet-csharp/svchelp wantedGood for community contributors to help [up-for-grabs]in-prThis issue will be closed (fixed) by an active pull request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions