Ανάγνωση στα Αγγλικά Επεξεργασία

Κοινή χρήση μέσω


TextFieldParser.HasFieldsEnclosedInQuotes Property

Definition

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

C#
public bool HasFieldsEnclosedInQuotes { get; set; }

Property Value

True if fields are enclosed in quotation marks; otherwise, False.

Examples

This example sets the HasFieldsEnclosedInQuotes property to True for myReader.

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

Remarks

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.

Applies to

Προϊόν Εκδόσεις
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also