I am trying to read from a pbx file using StreamReader, edit the contents and display the contents in a new file using TextReader in C #.
This is my first development task in C #.
I learned java in uni and my new job is using C #.
Basically I have to read the list of entries contained in the pbx file from the telephone system. However, these records contain a line of good call records, followed by a line with several dodgy characters, followed by another line of good records.
My task is to read this file line by line, and then write a piece of code to ignore lines with dodgy characters and output good entries to a new file on my c: \ drive, which ive is called output.txt.
I can write a while loop to pull out dodgy characters, but I'm not sure about the C # code to read from the pbx file on my c drive, and then output the edited content to a new file called output.txt, also on my c.
I am new to C # and have studied Google for many hours. Just need a little guidance, and I'm off ...
source
share