Provides methods and properties for parsing structured text files.
| C# | Visual Basic |
public class TextFieldParser : IDisposable
Public Class TextFieldParser _ Implements IDisposable
| All Members | Constructors | Methods | Properties | ||
| Icon | Member | Description |
|---|---|---|
| TextFieldParser(Stream) | Initializes a new instance of the TextFieldParser class | |
| TextFieldParser(TextReader) | Initializes a new instance of the TextFieldParser class | |
| TextFieldParser(String) | Initializes a new instance of the TextFieldParser class | |
| TextFieldParser(Stream, Encoding) | Initializes a new instance of the TextFieldParser class | |
| TextFieldParser(String, Encoding) | Initializes a new instance of the TextFieldParser class | |
| TextFieldParser(Stream, Encoding, Boolean) | Initializes a new instance of the TextFieldParser class | |
| TextFieldParser(String, Encoding, Boolean) | Initializes a new instance of the TextFieldParser class | |
| Close()()()() |
Closes the current TextFieldParser object.
| |
| CommentTokens | ||
| Delimiters |
Defines the delimiters for a text file.
| |
| Dispose(Boolean) | Releases the unmanaged resources used by the TextFieldParser and optionally releases the managed resources | |
| Dispose()()()() | Releases all resources used by the TextFieldParser | |
| EndOfData |
Returns True if there are no non-blank lines between the current cursor position and the end of the file.
| |
| Equals(Object) | (Inherited from Object.) | |
| ErrorLine |
Returns the line that caused the most recent MalformedLineException exception.
| |
| ErrorLineNumber |
Returns the number of the line that caused the most recent MalformedLineException exception.
| |
| FieldWidths |
Denotes the width of each column in the text file being parsed.
| |
| Finalize()()()() |
Allows the TextFieldParser object to attempt to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Overrides Object.Finalize()()()().) | |
| GetHashCode()()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetType()()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
| HasFieldsEnclosedInQuotes |
Denotes whether fields are enclosed in quotation marks when parsing a delimited file.
| |
| LineNumber |
Returns the current line number, or returns -1 if no more characters are available in the stream.
| |
| MemberwiseClone()()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| ReadFields()()()() |
Reads all fields on the current line, returns them as an array of strings, and advances the cursor to the next line containing data.
| |
| ReadLine()()()() |
Returns the current line as a string and advances the cursor to the next line.
| |
| ReadToEnd()()()() | ||
| SetDelimiters(array<String>[]()[][]) |
Sets the delimiters for the reader to the specified values, and sets the field type to Delimited.
| |
| SetFieldWidths(array<Int32>[]()[][]) |
Sets the delimiters for the reader to the specified values and the field type to FixedWidth.
| |
| TextFieldType |
Indicates whether the file to be parsed is delimited or fixed-width.
| |
| ToString()()()() | (Inherited from Object.) | |
| TrimWhiteSpace |
Indicates whether leading and trailing white space should be trimmed from field values.
|
| Object | |
| TextFieldParser | |