Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<string> collection = new List<string>() {"1", "2", "3"}
- <Collection>
- <Element>1</Element>
- <Element>2</Element>
- <Element>3</Element>
- </Collection>
- XElement Configuration =
- new XElement("Configuration",
- new XElement("Collection", collection.ToArray()
- ),
- );
- XElement Configuration = new XElement("Collection",
- collection.Select(c=>new XElement("Element", c)));
Add Comment
Please, Sign In to add comment