FileVersionInfo.CompanyName Proprietà

Definizione

Ottiene il nome della società che ha prodotto il file.

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

Valore della proprietà

Nome della società che ha prodotto il file o null se il file non contiene informazioni sulla versione.

Esempio

Nell'esempio seguente viene chiamato GetVersionInfo per ottenere per FileVersionInfo il Blocco note. Quindi stampa l'oggetto CompanyName in una casella di testo. Questo codice presuppone textBox1 che sia stata creata un'istanza di .

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

Si applica a