FileVersionInfo.CompanyName プロパティ

定義

ファイルを生成した会社の名前を取得します。

public:
 property System::String ^ CompanyName { System::String ^ get(); };
public string? CompanyName { get; }
public string CompanyName { get; }
member this.CompanyName : string
Public ReadOnly Property CompanyName As String

プロパティ値

ファイルを生成した会社の名前。ファイルにバージョン情報が含まれていない場合は null

次の例では、 GetVersionInfo を呼び出してメモ帳の FileVersionInfo を取得します。 次に、テキスト ボックスに CompanyName を出力します。 このコードでは、 textBox1 がインスタンス化されていることを前提としています。

private void GetCompanyName()
{
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo =
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");

    // Print the company name.
    textBox1.Text = "The company name: " + myFileVersionInfo.CompanyName;
}
Private Sub GetCompanyName()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")

    ' Print the company name.
    textBox1.Text = "The company name: " & myFileVersionInfo.CompanyName
End Sub

適用対象