Freigeben über


FileVersionInfo.Comments-Eigenschaft

Ruft die der Datei zugeordneten Kommentare ab.

Namespace: System.Diagnostics
Assembly: System (in system.dll)

Syntax

'Declaration
Public ReadOnly Property Comments As String
'Usage
Dim instance As FileVersionInfo
Dim value As String

value = instance.Comments
public string Comments { get; }
public:
property String^ Comments {
    String^ get ();
}
/** @property */
public String get_Comments ()
public function get Comments () : String

Eigenschaftenwert

Die der Datei zugeordneten Kommentare.

Hinweise

Diese Eigenschaft enthält zusätzliche Informationen, die für Diagnosezwecke angezeigt werden können.

Beispiel

Im folgenden Beispiel wird GetVersionInfo aufgerufen, um FileVersionInfo für den Editor abzurufen. Die Kommentare werden dann in einem Textfeld angezeigt. Bei diesem Code wird davon ausgegangen, dass textBox1 instanziiert wurde.

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
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;
 }
    
public:
   [PermissionSet(SecurityAction::Demand, Name="FullTrust")]
   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 = String::Concat( "Comments: ", myFileVersionInfo->Comments );
   }

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

FileVersionInfo-Klasse
FileVersionInfo-Member
System.Diagnostics-Namespace