LocationTextFieldParser.CommentTokens SyntaxDim fileParser As FileIO.TextFieldParser ' ...later... Dim result As String( ) = fileParser.CommentTokens or: fileParser.CommentTokens = setOfTokens
DescriptionThe CommentTokens property sets or retrieves the comment tokens used with a TextFieldParser object. Each comment token is a string of one or more characters. As each line of the input file is read by the parser, a comparison is done between each token and the first few characters of the input line. If there is a token match, the whole line is considered to be a comment line, and no fields are extracted from the line. Usage at a Glance
ExampleThe following example sets two comment tokens for the input file: "//" and "REM." Dim scanInput As Microsoft.VisualBasic.FileIO.TextFieldParser ' ...later... scanInput.CommentTokens = New String( ) {"//", "REM"} Related Framework Entries
See AlsoDelimiters Property, FieldWidths Property, PeekChars Method, TextFieldParser Object |