Import text file problem

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

Hello,

I have a fixed length text file that I want to import using c#.
I want to read each line and break it apart.
The problem is when I read a line, the data is not in a fixed position, so I
cannot substring it out.
The line ends with hex 0d 0a

If I open the file in Wordpad, it looks ok, all data lines up.

How can I resolve this?

Thanks

Frank
 
I don't understand the question. The 2 characters you're referring to are
carriage-return and line-feed characters, the standard Windows newline
character combination. Beyond that, I don't know what you mean by "not in a
fixed position," "substring it out," or "lines up."

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.
 
Thanks,

The substring values line up.
I was getting fooled because I was appending to a ListBox and that did not
line up.

Regards,

Frank
\
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top