FileVersionInfo.Comments Egenskap

Definition

Hämtar de kommentarer som är associerade med filen.

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

Egenskapsvärde

Kommentarerna som är associerade med filen eller null om filen inte innehåller versionsinformation.

Exempel

I följande exempel anropas GetVersionInfo för att hämta FileVersionInfo för Anteckningar. Sedan skrivs kommentarerna ut i en textruta. Den här koden förutsätter textBox1 att den har instansierats.

void GetComments()
{
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo =
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");
    // Print the comments in a text box.
    textBox1.Text = "Comments: " + myFileVersionInfo.Comments;
}
Sub GetComments()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
       FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")

    ' Print the comments in a text box.
    textBox1.Text = "Comments: " & myFileVersionInfo.Comments
End Sub

Kommentarer

Den här egenskapen innehåller ytterligare information som kan visas i diagnostiksyfte.

Gäller för