This documentation is archived and is not being maintained.

FileVersionInfo.Comments Property

Gets the comments associated with the file.

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

Property Value

The comments associated with the file.

Remarks

This property contains additional information that can be displayed for diagnostic purposes.

Example

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

[Visual Basic] 
Public Sub GetComments()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo("%systemroot%\Notepad.exe")
    
    ' Print the comments in a text box.
    textBox1.Text = "Comments: " & myFileVersionInfo.Comments
End Sub 'GetComments

[C#] 
public void GetComments() {
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    // Print the comments in a text box.
    textBox1.Text = "Comments: " + myFileVersionInfo.Comments;
 }
    

[C++] 
public:
void GetComments() {
    // Get the file version for the notepad.
    FileVersionInfo* myFileVersionInfo = FileVersionInfo::GetVersionInfo(S"%systemroot%\\Notepad.exe");
 
    // Print the comments in a text box.
    textBox1->Text = String::Format( S"Comments: {0}", myFileVersionInfo->Comments );
 }
    

[JScript] 
public function GetComments() {
    //Get the file version for the notepad.
    var myFileVersionInfo : FileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    //Print the comments in a text box.
    textBox1.Text = "Comments: " + myFileVersionInfo.Comments;
 }
    

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: