In c# read a text file and delete a string
Hi
I am new to c#.
I have to do a program such that
the program sould read any text file.
such that in those txt files i have data as
for ex:
countryside.txt file has dat as follows
1|ANZ|7757 96745|
2|METWAY|33433|
3|WESTPAC|67357|
5|TOWN & COUNTRY|487457|
6|COMMONWEALTH|3427457|
7|BANK OF MELBOURNE|3576437|
8|NATIONAL AUST BANK|7547327|
10|S.B OF SA|74572745|
11|ST GEORGE BANK|3473574|
in all these dat are seprated by pipeline seperator.
no w what i have to do is , the program have to read the txt file and has to delete the last pipeline seperator . and save it as a new file.
the result should be as follows
1|ANZ|7757 96745
2|METWAY|33433
3|WESTPAC|67357
5|TOWN & COUNTRY|487457
6|COMMONWEALTH|3427457
7|BANK OF MELBOURNE|3576437
8|NATIONAL AUST BANK|7547327
10|S.B OF SA|74572745
11|ST GEORGE BANK|3473574
the pipeline of the last element in each row shouyld be removed
..
this should happen in whatever text file read
so please can anyone help me to do this program in c#.
D H O L
__________________
SureShot
|