Share via


FileVersionInfo.Comments 속성

정의

파일과 관련된 주석을 가져옵니다.

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

설명

이 속성에는 진단을 위해 표시할 수 있는 추가 정보가 포함되어 있습니다.

적용 대상