
CommentTokens Property | 511
The ‘My’
Reference
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
Related Framework Entries
• Microsoft.VisualBasic.ApplicationServices.ConsoleApplicationBase.Command-
LineArgs Property
• Microsoft.VisualBasic.ApplicationServices.StartupEventArgs.CommandLine
Property
• System.Environment.CommandLine Property
See Also
Application Object, GetEnvironmentVariable Method
CommentTokens Property
Location
TextFieldParser.CommentTokens
Syntax
Dim fileParser As FileIO.TextFieldParser
' ...later...
Dim result As String( ) = fileParser.CommentTokens
or:
fileParser.CommentTokens = setOfTokens
setOfTokens (required; String array)
An array of the character or multicharacter values that, when appearing at the
start of a line in the input file being parsed by a TextFieldParser object, indicate
that the line should be considered as a comment. Any array elements with zero-
length strings are ignored.
Description
The CommentTokens property sets or retrieves the comment tokens used with a Text-
FieldParser 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 ...