FileVersionInfo.Comments Propriedade

Definição

Obtém os comentários associados ao arquivo.Gets the comments associated with the file.

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

Valor da propriedade

String

Os comentários associados ao arquivo ou null se o arquivo não contiver informações de versão.The comments associated with the file or null if the file did not contain version information.

Exemplos

O exemplo a seguir chama GetVersionInfo para obter o FileVersionInfo bloco de notas.The following example calls GetVersionInfo to get the FileVersionInfo for the Notepad. Em seguida, ele imprime os comentários em uma caixa de texto.Then it prints the comments in a text box. Esse código pressupõe que textBox1 tenha sido instanciado.This code assumes textBox1 has been instantiated.

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

Comentários

Esta propriedade contém informações adicionais que podem ser exibidas para fins de diagnóstico.This property contains additional information that can be displayed for diagnostic purposes.

Aplica-se a