FileVersionInfo.Comments Vlastnost

Definice

Získá komentáře přidružené k souboru.

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

Hodnota vlastnosti

Komentáře přidružené k souboru nebo null pokud soubor neobsahoval informace o verzi.

Příklady

Následující příklad volá GetVersionInfo , aby získal pro FileVersionInfo Poznámkový blok. Pak se komentáře vytisknou do textového pole. Tento kód předpokládá, že textBox1 došlo k vytvoření instance.

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;
}
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

Poznámky

Tato vlastnost obsahuje další informace, které lze zobrazit pro diagnostické účely.

Platí pro