private int GetItemCount(List<HeapshotUIObject> objects) { int num = 0; foreach (HeapshotUIObject obj2 in objects) { num++; if (obj2.IsExpanded) { num += this.GetItemCount(obj2.Children); } } return num; }