Monday 15 April 2013

c# - The old switcheroo (switch position in file) -


I really appreciate it if someone can help / advise me.

I have a file, probably about 50000 lines are long, these files are generated on a weekly basis

  address ^ name ^ notes  

But I need it. A switch should be able to switch the address with me (on each and every line). Therefore, after the switch, the names will be first, and then the addresses and notes, such as:

Result file:

  name ^ address ^ notes <50,000 that day is not so much , So read the entire file and output just in the bus. The desired format should work fine for you:  
  string [] rows = file. Read all files (filename); String newLine = string.Empty; Foreach (string line in lines) {string [] items = line Split (myItemDelimiter); NewLine = string.Format ("{0}, {1}, {2}", item [1], item [0], objects [2]); // Add new file here ...}  

No comments:

Post a Comment