2
Answers

C# Converting file format.

Hi, I have two pipe-delimited text files (say, A.txt and B.txt).

Below is A.txt file format, a standard format (can think of as Universal Set)

"EmpId"|"FName"|"LName"|"Sex"|"DOB"|"SSN"|"TagId1"|"TagId2" 

Below is B.txt file (can think of Sub Set) with column and 2 records.

"SSN"|"LName"|"FName"|"DOB"|"Sex"|"EmpId" 
"123"|"Barrat"|"Alanzon"|"1983"|"F"|"4455"
"678"|"Alexia"|"Timothy"|"1975"|"M"|"2222"||"baz"

I need to convert B.txt into A.txt format’s columns order. Expected result is:

"EmpId"|"FName"|"LName"|"Sex"|"DOB"|"SSN"|"TagId1"|"TagId2" 
"4455"|"Alanzon"|"Barrat"|"F"|"1983"|"123"|||
"2222"|" Timothy "|" Alexia"|"M"|"1975"|"678"||"baz"
thanks!
Answers (2)