LocationTextFieldParser.SetDelimiters SyntaxDim fileParser As FileIO.TextFieldParser ' ...later... fileParser.SetDelimiters(setOfDelimiters)
DescriptionThe SetDelimiters method sets the field delimiters used in delimited text file parsing. This method also sets the TextFieldParser object's TextFieldType property to Microsoft.VisualBasic.FileIO.FieldType.Delimited. Although you can define more than one delimiter, most input files will use a single field delimiter, such as a comma or a tab character. You can use the TextFieldParser object's Delimiters property to set the delimiters as well, but that property does not alter the TextFieldType property. Usage at a Glance
ExampleThe following example uses the SetDelimiters method to indicate the comma character as the field delimiter. Dim scanInput As Microsoft.VisualBasic.FileIO.TextFieldParser ' ...later... scanInput.SetDelimiters(New String( ) {","}) Related Framework Entries
See AlsoCommentTokens Property, Delimiters Property, FieldWidths Property, HasFieldsEnclosedInQuotes Property, ReadFields Method, SetFieldWidths Method, TextFieldParser Object, TextFieldType Property, TrimWhiteSpace Property |