FileVersionInfo.Comments Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the comments associated with the file.
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
Property Value
The comments associated with the file or null
if the file did not contain version information.
Examples
The following example calls GetVersionInfo to get the FileVersionInfo for the Notepad. Then it prints the comments in a text box. This code assumes textBox1
has been instantiated.
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
Remarks
This property contains additional information that can be displayed for diagnostic purposes.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET