//[XmlElement("category")] //public List<CategoryElement> Categories; public CategoryElement Clone() { var copy = new CategoryElement() { ID = this.ID, ParentID=this.ParentID, Name = this.Name }; //if (this.Categories != null) //{ // copy.Categories = new List<CategoryElement>(); // foreach (var c in Categories) // copy.Categories.Add(c.Clone()); //} return copy; }
//[XmlElement("category")] //public List<CategoryElement> Categories; public CategoryElement Clone() { var copy = new CategoryElement() { ID = this.ID, ParentID=this.ParentID, Name = this.Name }; //if (this.Categories != null) //{ // copy.Categories = new List<CategoryElement>(); // foreach (var c in Categories) // copy.Categories.Add(c.Clone()); //} return copy; }