我正在創建一個XElement對象,並且在使用Linq將多個元素添加到節點時遇到問題。 有對象的多個屬性的列表: class Point { int x; int y; ... }
List<Point> Points = new List<Point>()
{
new Point(1,2),
new Point(3,4)
};
我想這個列表轉換爲使用單獨的構造平坦
我有一個任務是創建帶有功能的Windows窗體,以創建文件和文件夾層次結構的XML文件。我確實設法做到了,但遇到了一些麻煩。這裏是我的代碼: public static XElement xmlTreeView(DirectoryInfo dir)
{
XDocument xmlDocument = new XDocument(
new XDeclaration(
我有一個類,它包含的XElement對象的屬性... public class SomeClass
{
public string prop1 = "";
public string prop2 = "";
public XElement elem = null;
}
我與實例後設置的XElement屬性代碼另一個內部定義的類的對象...... UserFie