ResXDataNode.Comment 屬性

定義

取得或設定有關這個資源的任意註解。Gets or sets an arbitrary comment regarding this resource.

public:
 property System::String ^ Comment { System::String ^ get(); void set(System::String ^ value); };
public string Comment { get; set; }
member this.Comment : string with get, set
Public Property Comment As String

屬性值

String

表示註解的字串。A string that represents the comment.

範例

請參閱類別的範例 ResXDataNodeSee the example for the ResXDataNode class.

備註

如果批註尚未指派給資源專案,則屬性的值 CommentString.EmptyIf a comment has not been assigned to the resource item, the value of the Comment property is String.Empty.

您可以藉 Comment 由具現化 ResXResourceReader 物件、將 ResXResourceReader.UseResXDataNodes 屬性設為 true ,然後呼叫 ResXResourceReader.GetEnumerator 方法來取得 IDictionaryEnumerator 用來列舉 XML 資源檔中專案的物件,藉以存取現有 XML 資源檔中資料節點的屬性。You access the Comment property of an data node in an existing XML resource file by instantiating a ResXResourceReader object, setting the ResXResourceReader.UseResXDataNodes property to true, and calling the ResXResourceReader.GetEnumerator method to retrieve an IDictionaryEnumerator object that you use to enumerate the items in the XML resource file. 屬性會傳回 IDictionaryEnumerator.Value ResXDataNode 物件。The IDictionaryEnumerator.Value property returns the ResXDataNode object.

適用於