<paramref> (C# 程式設計手冊)

<paramref name="name"/>

參數

  • name
    為將參考之參數的名稱。 以雙引號 (" ") 將名稱括起來。

備註

<paramref> 標記可用於表示程式碼註解 (例如 <summary> 或 <remarks> 區塊) 內的文字參考某個參數。 如此在處理 XML 檔案時,便會以醒目的方式將這些文字格式化,例如粗體或斜體字。

使用 /doc 進行編譯,將文件註解處理為檔案。

範例

// compile with: /doc:DocFileName.xml 

/// text for class TestClass
public class TestClass
{
    /// <summary>DoWork is a method in the TestClass class.  
    /// The <paramref name="Int1"/> parameter takes a number.
    /// </summary>
    public static void DoWork(int Int1)
    {
    }

    /// text for Main
    static void Main()
    {
    }
}

請參閱

參考

建議使用的文件註解標籤 (C# 程式設計手冊)

概念

C# 程式設計手冊