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.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft