Problem solve Get help with specific problems with your technologies, process and projects.

Modifying the text in the nth line using a .NET program

I have a text file and I have to modify the text in the nth line of the file using a .NET program. I tried to do this by reading line-by-line and writing it back to a new file using io.streamwriter, but it replaces characters like V?ommen to Vlkommen.
It looks like you are not accounting for internationalized characters. What you'll need to do is read up on the System.Globalization namespace and the CultureInfo class in particular. If the text file is ASCII based, you may want to strongly consider moving to UNICODE so you can handle any languages you need to handle.

Dig Deeper on .NET Framework 3.0 design and architecture tools

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.