I'm trying to build up xml document from scratch with use linq-to-xml.

```
XElement root = new XElement("RootNode");
            XDocument doc = new XDocument(
            new XDeclaration("1.0", "utf-8", ""), root
            );
            for (int j = 0; j < 10; j++)
            {
                XElement element = new XElement("SetGrid");
                element.SetElementValue("ID", j);                    
                root.Add(element);

            }
   var reader = doc.CreateReader();//doc has 10 elements inside root element
   string result = reader.ReadInnerXml();//always empty string

```

How can I get string from `XDocument`?