public virtual object Clone() { DComponent clone = new DComponent(); clone.CopyAttributesFrom(this); clone.m_mapsTo = m_mapsTo; if(m_location != null) { clone.m_location = (Location)m_location.Clone(); } if(m_children != null) { clone.m_children = new ArrayList(); for(int i = 0; i < m_children.Count; i++) { IUimlElement element = (IUimlElement)m_children[i]; clone.m_children.Add(element.Clone()); } } return clone; }