Share via


FileVersionInfo.CompanyName Özellik

Tanım

Dosyayı üreten şirketin adını alır.

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

Özellik Değeri

Dosyayı üreten şirketin adı veya null dosya sürüm bilgisi içermiyorsa.

Örnekler

Aşağıdaki örnek, Not Defteri için öğesini FileVersionInfo almak için çağrısı GetVersionInfo yapar. Ardından metin kutusuna CompanyName yazdırır. Bu kodun textBox1 örneği alındığını varsayar.

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

Şunlara uygulanır