Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Improve description of `limitations of extensions`

オープン 初心者向け
#56,626 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp
領域
documentation

調査の方向性

docs/csharp/advanced-topics/interface-implementation/mixins-with-default-interface-methods.md を読み、拡張メンバーの解決に関する段落を、issue で提案された文言とあわせて確認してください。変数の宣言型が呼び出されるメソッドにどのように影響するかを明確に説明するよう、説明を更新してください。提起された混乱に対処し、記事の用語に合わせた説明になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

:watch: Not Triaged advanced-concepts/subsvc dotnet-csharp/svc
Type of issue

Missing information

Description

I tried to understand the following sentences but it was not easy for me. For instance I missed the part that the method was not specified on interface so the method call resolved to e anxtension method.

Extension members are resolved at compile time, using the declared type of the variable. Classes that implement the interface can provide a better implementation for any extension member. Variable declarations must match the implementing type to enable the compiler to choose that implementation. When the compile-time type matches the interface, method calls resolve to the extension member.

I suggest we replace with

The compiler chooses an extension method based on the variable's declared type, not the object's actual type. If a class has its own method with the same name as an extension method, that method is used only when the variable is declared as that class. If the variable is declared as the interface, the compiler can't see the class's method, so it calls the extension method.

What do you think of it? Appreciate any feedbacks!

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

主要言語
言語のデータがありません
スター
4.8k
フォーク
6.1k
平均マージ
1日 1時間
マージ済み PR(30日)
215

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotnet/docs のほかの issue

dotnet/docs の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。