c# - writing from two engines into same file -


hello have cvs file read, , calls , api information , written file shown below. 1 delimited record class.

        public class ee         {             [fieldorder(1)]             public string name;             [fieldorder(2)]             public string description;             [fieldorder(3)]          }   ....creating engine....    using (enginev2.beginwritefile(@"c:\update\" + filename))                 {                     foreach (eeeeoutput in arrayemployees)                     {                         enginev2.writenext(eeoutput);                     }              } 

now have create delimited record has different structure, need write same file. meaning having 2 different filehelpers engines write 1 after same file. possible?

i have simplified amount of fields sake of example. both different , have lot of fields.

public class eetravel         {             [fieldorder(1)]             public string trxtype;             [fieldquoted('"', quotemode.optionalforboth, multilinemode.allowforread)]             [fieldorder(2)]             public string employeeid;     }    using (enginetravel.beginwritefile(@"c:\update\" + filename))                 {                     foreach (employees_travel eetravel in arraytravel)                     {                         enginetravel.writenext(eetravel);                     }                  } 

when have code above, on rides first engine wrote. question is, how second engine pick first engine left off, , update file?

thank

 using (enginetravel.beginappendtofile(@"c:\update\" + filename))                 {                     foreach (eetravel eetravel in arraytravel)                     {                         enginetravel.writenext(eetravel);                     }                  } 

used .beginappendtofile in second engine , picked other engine left off.


Comments