帮忙看下这几行创建xml的代码有什么错误
帮忙看下这几行创建xml的代码有什么错误,应该怎样改?
代码如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
namespace xml_test2
{
class Program
{
public static void CreateDocument( )
{
XDocument xdoc = new XDocument( new XDeclaration("1.0","utf-8","yes") , new XElement("Root","root") );
xdoc.Save(path);
}
static void Main(string[] args)
{
}
}
}