Bagikan melalui


FileVersionInfo.FileDescription Properti

Definisi

Mendapatkan deskripsi file.

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

Nilai Properti

Deskripsi file atau null jika file tidak berisi informasi versi.

Contoh

Contoh berikut memanggil GetVersionInfo untuk mendapatkan FileVersionInfo untuk Notepad. Kemudian mencetak FileDescription dalam kotak teks. Kode ini mengasumsikan textBox1 telah dibuat.

private:
    void GetFileDescription()
    {
        // Get the file version for the notepad.
        FileVersionInfo^ myFileVersionInfo =
        FileVersionInfo::GetVersionInfo( Environment::SystemDirectory + "\\Notepad.exe" );

        // Print the file description.
        textBox1->Text = String::Concat( "File description: ", myFileVersionInfo->FileDescription );
    }
private void GetFileDescription()
{
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo =
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");

    // Print the file description.
    textBox1.Text = "File description: " + myFileVersionInfo.FileDescription;
}
Private Sub GetFileDescription()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
    
    ' Print the file description.
    textBox1.Text = "File description: " & myFileVersionInfo.FileDescription
End Sub

Berlaku untuk