开发者

asp.net mvc setting XElement xml to empty

How can I do something like XEl开发者_高级运维ement xml =empty;


Use the RemoveAll method to remove all child elements:

xml.RemoveAll();

This will leave you with your existing XElement as is but if you wanted to clear that out too just create a new XElement entirely.

xml = new XElement("name");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜