FileVersionInfo.CompanyName Propriété

Définition

Obtient le nom de la société ayant créé le fichier.

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

Valeur de propriété

String

Nom de la société qui a produit le fichier ou null si le fichier ne contenait pas d'informations de version.

Exemples

L’exemple suivant appelle GetVersionInfo pour obtenir le FileVersionInfo Bloc-notes. Ensuite, il imprime le CompanyName contenu dans une zone de texte. Ce code suppose qu’il textBox1 a été instancié.

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

S’applique à