Exemplo n.º 1
0
		public void AttachNewChild(Child c)
		{
			if (c.Parent != null)
			{
				c.Parent.Children.Remove(c);
			}
			c.Parent = this;
			_children.Add(c);
		}
Exemplo n.º 2
0
		public void AddNewChild()
		{
			var c = new Child {Name = "New Child", Parent = this};
			_children.Add(c);
		}