hellow
I need to convert each entity of a text file like --> abc,123 should be covert to 'abc','123'
thanks in advance
hellow
I need to convert each entity of a text file like --> abc,123 should be covert to 'abc','123'
thanks in advance
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted Feb 2, 2009, 11:58 PM
abc,123
def,456
ghi,789
You can read the file line by line with a StreamReader, split each line into an array using the strings Split method and the comma as a delimiter, take those and add them to an array of other strings formatting them like you want as you go. When the file has been read, overwrite it using a StreamWriter and a foreach loop.