FileVersionInfo.Comments Tulajdonság

Definíció

Lekéri a fájlhoz társított megjegyzéseket.

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

Tulajdonság értéke

A fájlhoz társított megjegyzések, vagy null ha a fájl nem tartalmaz verzióinformációkat.

Példák

Az alábbi példa meghívja GetVersionInfo a FileVersionInfo Jegyzettömb lekérését. Ezután kinyomtatja a megjegyzéseket egy szövegdobozban. Ez a kód feltételezi textBox1 , hogy példányosították.

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

Megjegyzések

Ez a tulajdonság további információkat tartalmaz, amelyek diagnosztikai célokra jeleníthetők meg.

A következőre érvényes: