This documentation is archived and is not being maintained.

TextFieldParser.Delimiters Property 

Defines the delimiters for a text file.

' Usage
Dim value As String() = TextFieldParserObject.Delimiters
' Declaration
Public Property Delimiters As String()

String ().

The following condition may result in an exception:

  • An attempt to use a newline character, an empty string, or Nothing as a delimiter (ArgumentException).

This property is meaningful only if TextFieldType = FieldType.Delimited.

Defining the delimiters for a text file can also be accomplished with the SetDelimiters method. For more information, see TextFieldParser.SetDelimiters Method.

The following table lists an example of a task involving the Delimiters property.

To See

Read from a delimited text file

How to: Read From Comma-Delimited Text Files in Visual Basic

This example specifies that the delimiter for the TextFieldParser object, FileReader, is a comma (,).

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

Namespace: Microsoft.VisualBasic.FileIO

Class: TextFieldParser

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

No permissions are required.