当社では、過剰なXmlコメントを記述しています。典型的な方法はある。このように文書化する必要があります:あなたは<see cref>
タグを使用して参照することができるほぼすべての名詞を見ることができるようにC#XMLコメント:XMLコメント内の<see ... />参照はどれくらい便利ですか?
/// <summary>
/// Determines whether this <see cref="IScheduler"/> contains a specific <see cref="ISchedule"/>.
/// </summary>
/// <param name="schedule">The <see cref="ISchedule"/> to locate in this <see cref="IScheduler"/>.</param>
/// <returns>
/// Returns <see langword="true"/> if <paramref name="schedule"/> is found in this <see cref="IScheduler"/>; otherwise, <see langword="false"/>.
/// </returns>
bool Contains(ISchedule schedule);
/// <summary>
/// Removes and <see cref="IDisposable.Dispose"/>s the first occurrence of a specific <see cref="ISchedule"/>
/// from this <see cref="IScheduler"/>.
/// </summary>
/// <param name="schedule">The <see cref="ISchedule"/> to remove from this <see cref="IScheduler"/>.</param>
/// <exception cref="System.ArgumentNullException">Is thrown when the parameter schedule is null.</exception>
/// <exception cref="System.ArgumentException">Is thrown when the <see cref="ISchedule"/> is not found in this <see cref="IScheduler"/> or was of the wrong type.</exception>
void Remove(ISchedule schedule);
。
これはあまりにも多く見つかりました。私たちのコードファイルのほとんどは、そのようなコメントで爆破されています。コメントセクションをほとんど読めるようにします。
あなたはどう思いますか?このような種類の文書がコード内に好きですか?そうではありませんか?
いつものように、このような種類の質問には白黒の回答はないと思うので、私はそれをwikiにしました。
EDIT:
see-ref-tags自体がデフォルトで有効であれば私の質問はありませんでした。 .chmファイル(または他の種類の生成されたdocu)で生成されたリンクは非常に便利であることは明らかです。私の質問は、コメント内のすべての "リンク可能な"名詞が出現するたびにタグを付けることが本当に役立つかどうかということでした。
サンドキャッスルを使用して毎晩ドキュメントを生成します。残念ながら、それは他の開発者によって非常に珍しく使用されていますが、それは別の問題です。
ReSharperの「クイックドキュメント」機能(私のキーマッピングではCtrl-Q)を使用すると非常に便利です。 – adrianbanks