SetDelimiters Method
Collapse the table of content
Expand the table of content

TextFieldParser.SetDelimiters Method

Sets the delimiters for the reader to the specified values, and sets the field type to Delimited.

Namespace:  Microsoft.VisualBasic.FileIO
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

public void SetDelimiters(
	params string[] delimiters


Type: System.String[]
Array of type String.


A delimiter is zero-length.

The existing contents of the Delimiters property are cleared when this method is set.

This method provides a way to set delimiters without creating an array.

The following table lists an example of a task involving the SetDelimiters method.

This example opens a text field parser and defines the delimiter as vbTab.

Using FileReader As New Microsoft.VisualBasic.FileIO.

End Using

Replace the path C:\logs\test.log with the path and name of the file you wish to parse.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

© 2016 Microsoft