FileVersionInfo.CompanyName Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient le nom de la société qui a produit le fichier.
public:
property System::String ^ CompanyName { System::String ^ get(); };
public string CompanyName { get; }
member this.CompanyName : string
Public ReadOnly Property CompanyName As String
Valeur de propriété
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 d’appel GetVersionInfo suivant permet d’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 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