FileVersionInfo.CompanyName 속성

정의

파일을 만든 회사의 이름을 가져옵니다.

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

속성 값

파일을 만든 회사의 이름이거나, 파일에 버전 정보가 없는 경우 null입니다.

예제

다음 예제에서는 를 호출 GetVersionInfo 하여 메모장에 대한 를 가져옵니다 FileVersionInfo . 그런 다음 텍스트 상자에 를 CompanyName 인쇄합니다. 이 코드는 인스턴스화되었다고 가정합니다 textBox1 .

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

적용 대상