Export (0) Print
Expand All

TextFieldParser.TrimWhiteSpace Property 

Indicates whether leading and trailing white space should be trimmed from field values.


' Usage
Dim value As Boolean = TextFieldParserObject.TrimWhiteSpace
' Declaration
Public Property TrimWhiteSpace As Boolean

Boolean.

The default value for this property is True.

This example creates a TextFieldParser, FileReader, and sets the TrimWhiteSpace property to True.

Using FileReader As New _
Microsoft.VisualBasic.FileIO.TextFieldParser("C:\ParserText.txt")
    FileReader.TextFieldType = _
    Microsoft.VisualBasic.FileIO.FieldType.Delimited
    FileReader.SetDelimiters(",")
    FileReader.TrimWhiteSpace = True
End Using

Namespace: Microsoft.VisualBasic.FileIO

Class: TextFieldParser

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

No permissions are required.

Community Additions

ADD
Show:
© 2014 Microsoft