I'm trying to format an XML element with three strings padded to 10 characters with spaces. Here is the code I'm using.
The three strings are set in the model.
public string a{ get; set; }
public string b{ get; set; }
public string c{ get; set; }
and then formated to an XElement
var itemElement = new XElement("item",
new XElement("abc", string.Format("{0:-10}{1:-10}{2:-10}", i.a, i.b, i.c))
);
it should be producing "a(padding)b(padding)c(padding)", but is producing "abc" within the node.
Any ideas?