Udostępnij za pośrednictwem


NumberOfChars must be greater than zero

When using the PeekChars method of the TextFieldParser object, you must supply a NumberOfChars value that is greater than 0.

To correct this error

  • Change NumberOfChars to a value that is greater than 0.

See Also

Tasks

How to: Read From Text Files with Multiple Formats in Visual Basic

Concepts

Parsing Text Files with the TextFieldParser Object

Reference

My.Computer.FileSystem.OpenTextFieldParser Method

TextFieldParser.PeekChars Method

TextFieldParser Object