public int GetSize() { int size = 1; if (FirstChild != null) { size += FirstChild.GetSize(); } if (NextSibling != null) { size += NextSibling.GetSize(); } return(size); }