G
Guest
Hey,
it must be very simple but I am struggeling.
I want to make a simple flat file.
I do now (I also tried with string)
foreach(Object obj in collection)
{
recordline = new StringBuilder();
recordline.Capacity = 200;
recordline.append("R01",1,3);
recordline.append("TEST",4,4);
recordline.append(obj.textfield,8,10);
recordline = recordline + "\n"; // New line is it nessecary?
streamwriterCubic.Writeline(recordline);
}
streamwriterCubic.Close.
It don'work. Receive an error on startindex in append (also when I used
Insert). I also tried with a foreach too fill up the recordline witj 200
blanc's. But I think that is not a good idea. There must be something simple.
Thanks for showing me the best way.
Jac
it must be very simple but I am struggeling.
I want to make a simple flat file.
I do now (I also tried with string)
foreach(Object obj in collection)
{
recordline = new StringBuilder();
recordline.Capacity = 200;
recordline.append("R01",1,3);
recordline.append("TEST",4,4);
recordline.append(obj.textfield,8,10);
recordline = recordline + "\n"; // New line is it nessecary?
streamwriterCubic.Writeline(recordline);
}
streamwriterCubic.Close.
It don'work. Receive an error on startindex in append (also when I used
Insert). I also tried with a foreach too fill up the recordline witj 200
blanc's. But I think that is not a good idea. There must be something simple.
Thanks for showing me the best way.
Jac