Exemple #1
0
        //[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;
        }
Exemple #2
0
        //[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;
        }