FileVersionInfo.Comments 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得與檔案關聯的註解。
public:
property System::String ^ Comments { System::String ^ get(); };
public string? Comments { get; }
public string Comments { get; }
member this.Comments : string
Public ReadOnly Property Comments As String
屬性值
與檔案關聯的註解,如果檔案未包含版本資訊,則為 null
。
範例
下列範例會呼叫 GetVersionInfo 以取得 FileVersionInfo [記事本] 的 。 然後它會列印文字框中的批注。 此程式代碼假設 textBox1
已具現化。
void GetComments()
{
// Get the file version for the notepad.
FileVersionInfo^ myFileVersionInfo =
FileVersionInfo::GetVersionInfo(Environment::SystemDirectory + "\\Notepad.exe");
// Print the comments in a text box.
textBox1->Text = "Comments: " + myFileVersionInfo->Comments;
}
void GetComments()
{
// Get the file version for the notepad.
FileVersionInfo myFileVersionInfo =
FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");
// Print the comments in a text box.
textBox1.Text = "Comments: " + myFileVersionInfo.Comments;
}
Sub GetComments()
' Get the file version for the notepad.
Dim myFileVersionInfo As FileVersionInfo = _
FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
' Print the comments in a text box.
textBox1.Text = "Comments: " & myFileVersionInfo.Comments
End Sub
備註
此屬性包含可針對診斷目的顯示的其他資訊。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應