When I am using an XElement once, should I declare it inline e.g.
user.name = new XElement("Name", "John Doe");
or declare the XElement on its own line, e.g.
XElement elem = new XElement("Name", "John Doe");
user.name = elem;
Use whatever you like. The compiler will optimize it to the same thing anyway.