標記 <value> 可讓您描述屬性和屬性存取子方法。 當您在 Visual Studio 集成開發環境中新增具有程式代碼精靈的屬性時,它會新增 <summary> 新屬性的標籤。 您必須手動新增 <value> 標記,以描述 屬性所代表的值。
語法
/// <value>property-description</value>
參數
property-description
屬性的描述。
備註
使用 /doc 編譯 以處理檔案的檔批注。
範例
// xml_value_tag.cpp
// compile with: /LD /clr /doc
// post-build command: xdcmake xml_value_tag.dll
using namespace System;
/// Text for class Employee.
public ref class Employee {
private:
String ^ name;
/// <value>Name accesses the value of the name data member</value>
public:
property String ^ Name {
String ^ get() {
return name;
}
void set(String ^ i) {
name = i;
}
}
};