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

`this()` is not necessary since C#11

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

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

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

評価

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

調査の方向性

例は docs/csharp/modern-events.md の SearchDirectoryArgs 構造体にあり、コンストラクターが : this() で終わっています。この初期化子を削除し、そのすぐ上か下にある、未割り当てプロパティのエラーを避けるには this() が必要だと書かれた文章を確認してください。その文も書き直すか削除する必要があります。例が記述どおりに C# 11 でコンパイルでき、説明がそれと一致していれば完了です。

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

説明

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

Typo

Description

The code example of struct SearchDirectoryArgs has an example constructor internal SearchDirectoryArgs(string dir, int totalDirs, int completedDirs) : this() . The text explains that calling this() because Without that addition, the rules of C# would report that the properties are being accessed before being assigned..

The reason is not true since C#11. The compiler automatically zero-initializes any fields you don't assign in a constructor. I suggest we remove this() because all 3 properties are initialized and this is a beginner-friendly document:)

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/modern-events

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/modern-events.md

Document Version Independent Id

645a8a12-a026-bee9-7501-e8ec4a32ce31

Platform Id

9c865adf-6af0-1f7e-0fcb-510d233d5680

Article author

@BillWagner

Metadata
  • ID: 2cb74e28-b327-0f9f-5fa5-882a00d10ceb
  • PlatformId: 9c865adf-6af0-1f7e-0fcb-510d233d5680
  • Service: dotnet-csharp
  • Sub-service: fundamentals

Related Issues

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

環境構築

Codespaces で開く

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

はじめの一歩

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

dotnet/docs のほかの issue

dotnet/docs の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

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

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