ResXDataNode.Comment 屬性


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

 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


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


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


如果尚未將批註指派給資源專案,則Comment屬性的值為。 String.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屬性會傳回物件。 ResXDataNodeThe IDictionaryEnumerator.Value property returns the ResXDataNode object.