How can I create a list with objects containing a set of values to feed XML.
I do have declared : public List<line> line{ get; set; }
I need to create multiple objects of line for every orderline. I'm sure the problem is in IEnumerable declaration yet i don't knwo how to fix it. Right now the code ends at getEnumerator() since its null.
protected mySchema.lines createlines()
{
mySchema.lines lines = new mySchema.lines();
lines.zz = '3';
lines.xx = '100.00';
System.Collections.IEnumerable list = lines.line;
System.Collections.IEnumerator enumerator = list.GetEnumerator();
while (enumerator.MoveNext())
{
line myline = enumerator.current;
myline = this.createline();
}
return FaWiersze;
}
protected mySchema.line createline()
{
mySchema.line line = new mySchema.line();
line.qq = '1';
line.ww = 'aaa';
line.ee = 'bbb';
line.rr = 'ccc.';
return line;
}