TextFieldParser.CommentTokens Propriedade

Definição

Define tokens de comentário.Defines comment tokens. Um token de comentário é uma cadeia de caracteres que, quando colocada no início de uma linha, indica que a linha é um comentário e deve ser ignorada pelo analisador.A comment token is a string that, when placed at the beginning of a line, indicates that the line is a comment and should be ignored by the parser.

public:
 property cli::array <System::String ^> ^ CommentTokens { cli::array <System::String ^> ^ get(); void set(cli::array <System::String ^> ^ value); };
public string[]? CommentTokens { get; set; }
public string[] CommentTokens { get; set; }
member this.CommentTokens : string[] with get, set
Public Property CommentTokens As String()

Valor da propriedade

String[]

Uma matriz de cadeia de caracteres que contém todos os tokens de comentário para o objeto TextFieldParser.A string array that contains all of the comment tokens for the TextFieldParser object.

Exceções

Um token de comentário inclui espaço em branco.A comment token includes white space.

Exemplos

Este exemplo especifica que, para o TextFieldParser , FileReader as linhas que começam com uma aspa simples (') devem ser ignoradas.This example specifies that for the TextFieldParser, FileReader lines beginning with a single quotation mark (') should be ignored.

FileReader.TextFieldType = 
    Microsoft.VisualBasic.FileIO.FieldType.Delimited
FileReader.CommentTokens = New String() {"'"}

Comentários

Este é um membro avançado; Ele não aparecerá no IntelliSense, a menos que você clique na guia tudo .This is an advanced member; it does not show in IntelliSense unless you click the All tab.

Tokens de comentário de comprimento zero são ignorados.Zero-length comment tokens are ignored.

Aplica-se a

Confira também