FileVersionInfo.CompanyName Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan nama perusahaan yang memproduksi file.
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
Nilai Properti
Nama perusahaan yang menghasilkan file atau null
jika file tidak berisi informasi versi.
Contoh
Contoh berikut memanggil GetVersionInfo untuk mendapatkan FileVersionInfo untuk Notepad. Kemudian mencetak CompanyName dalam kotak teks. Kode ini mengasumsikan textBox1
telah dibuat.
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
Berlaku untuk
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk