FileVersionInfo.CompanyName Eigenschaft

Definition

Ruft den Namen des Unternehmens ab, das die Datei erstellt hat.

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

Eigenschaftswert

Der Name des Unternehmens, das die Datei erstellt hat oder null wenn die Datei keine Versionsinformationen enthält.

Beispiele

Im folgenden Beispiel wird aufgerufen GetVersionInfo , um das FileVersionInfo Editor-Steuerelement abzurufen. Anschließend wird das CompanyName Textfeld gedruckt. Dieser Code setzt voraus, dass textBox1 instanziiert wurde.

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

Gilt für: