FileVersionInfo.CompanyName Właściwość

Definicja

Pobiera nazwę firmy, która wyprodukowała plik.

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

Wartość właściwości

Nazwa firmy, która wyprodukowała plik lub null jeśli plik nie zawiera informacji o wersji.

Przykłady

Poniższe przykładowe wywołania GetVersionInfo w celu pobrania FileVersionInfo notatnika. Następnie drukuje element CompanyName w polu tekstowym. W tym kodzie założono, że textBox1 wystąpienie zostało utworzone.

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 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

Dotyczy