TextFieldParser.CommentTokens Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines comment tokens. 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()
Property Value
A string array that contains all of the comment tokens for the TextFieldParser object.
Exceptions
A comment token includes white space.
Examples
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() {"'"}
Remarks
This is an advanced member; it does not show in IntelliSense unless you click the All tab.
Zero-length comment tokens are ignored.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort: Gedurende 2024 worden GitHub Issues uitgefaseerd als het feedbackmechanisme voor inhoud. Dit wordt vervangen door een nieuw feedbacksysteem. Ga voor meer informatie naar:Feedback verzenden en bekijken voor