XML注释-引用类中的属性

本文关键字:属性 引用 注释 XML | 更新日期: 2023-09-27 18:27:03

如何在XML注释中描述属性Encoding初始化为默认值。

public class Settings
{
    public Encoding Encoding{get;set;}
        /// <summary>
        /// Initialize a new instance of a <c>HttpRequestSettings</c> type.
        /// </summary>
        /// <remarks>
        ///     <para>
        ///         How refer to property Encoding in class and describe that property Encoding is set do default ????
        ///     </para>
        /// </remarks>
        public Settings()
        {
            Encoding = Encoding.Default;
        }
}

XML注释-引用类中的属性

使用:

/// ...
/// This constructor sets <see cref="Encoding"/> to its default value.
/// ...

这会导致任何问题吗?我认为成员(属性)应该比没有嵌套在当前类中的类型(类)具有更高的"优先级"。