Export (0) Print
Expand All

FileVersionInfo.FileDescription Property

Gets the description of the file.

[Visual Basic]
Public ReadOnly Property FileDescription As String
[C#]
public string FileDescription {get;}
[C++]
public: __property String* get_FileDescription();
[JScript]
public function get FileDescription() : String;

Property Value

The description of the file.

Example

The following example calls GetVersionInfo to get the FileVersionInfo for the Notepad. Then it prints the FileDescription in a text box. This code assumes textBox1 has been instantiated.

[Visual Basic] 
Private Sub GetFileDescription()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo("%systemroot%\Notepad.exe")
    
    ' Print the file description.
    textBox1.Text = "File description: " & myFileVersionInfo.FileDescription
End Sub 'GetFileDescription

[C#] 
private void GetFileDescription() {
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    // Print the file description.
    textBox1.Text = "File description: " + myFileVersionInfo.FileDescription;
 }
    

[C++] 
private:
void GetFileDescription() {
    // Get the file version for the notepad.
    FileVersionInfo* myFileVersionInfo = FileVersionInfo::GetVersionInfo(S"%systemroot%\\Notepad.exe");
 
    // Print the file description.
    textBox1->Text = String::Format( S"File description: {0}", myFileVersionInfo->FileDescription );
 }
    

[JScript] 
private function GetFileDescription() {
    //Get the file version for the notepad.
    var myFileVersionInfo : FileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    //Print the file description.
    textBox1.Text = "File description: " + myFileVersionInfo.FileDescription;
 }
    

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

FileVersionInfo Class | FileVersionInfo Members | System.Diagnostics Namespace

Show:
© 2015 Microsoft