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

注釈

このプロパティには、診断目的で表示できる追加情報が含まれています。

適用対象