This documentation is archived and is not being maintained.

TextFieldParser.HasFieldsEnclosedInQuotes Property

Denotes whether fields are enclosed in quotation marks when a delimited file is being parsed.

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

public bool HasFieldsEnclosedInQuotes { get; set; }

Property Value

Type: System.Boolean
True if fields are enclosed in quotation marks; otherwise, False.

This is an advanced member; it does not show in IntelliSense unless you click the All tab.

If the property is True, the parser assumes that fields are enclosed in quotation marks (" ") and may contain line endings.

If a field is enclosed in quotation marks, for example, abc, "field2a,field2b", field3 and this property is True, then all text enclosed in quotation marks will be returned as is; this example would return abc|field2a,field2b|field3. Setting this property to False would make this example return abc|"field2a|field2b"|field3.

This example sets the HasFieldsEnclosedInQuotes property to True for myReader.

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

.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.