public int ChildCountByType(System.Type aType) { int count = 0; SymNodeEnumeratorChildren iterator = new SymNodeEnumeratorChildren(this); // foreach (SymNode node in iterator) { System.Type type = node.GetType(); // bool isInstanceOf = type.IsInstanceOfType(aType); bool isSubClassOf = type.IsSubclassOf(aType); bool isSameType = type.Equals(aType); // if (isInstanceOf || isSubClassOf || isSameType) { ++count; } } // return(count); }