Implemented interface member:
70 references to Count
System.Windows.Forms (24)
System\Windows\Forms\Controls\TreeView\TreeNode.cs (2)
670if (_parent is not null && _index + 1 < _parent.Nodes.Count) 828if (currentInd > 0 && currentInd <= _parent.Nodes.Count)
System\Windows\Forms\Controls\TreeView\TreeNode.TreeNodeAccessibleObject.cs (3)
194if (_owningTreeNode.Nodes.Count == 0) 204if (_owningTreeNode.Nodes.Count == 0) 216if (_owningTreeNode.Nodes.Count == 0)
System\Windows\Forms\Controls\TreeView\TreeNodeCollection.cs (6)
258for (int i = 0; i < treeNodeCollectionToLookIn.Count; i++) 274for (int i = 0; i < treeNodeCollectionToLookIn.Count; i++) 281if ((treeNodeCollectionToLookIn[i].Nodes is not null) && treeNodeCollectionToLookIn[i].Nodes.Count > 0) 381for (int index = 0; index < Count; ++index) 418for (int i = 0; i < Count; i++) 573private bool IsValidIndex(int index) => (index >= 0) && (index < Count);
System\Windows\Forms\Controls\TreeView\TreeNodeConverter.cs (4)
50if (node.Nodes.Count == 0) 59TreeNode[] nodesArray = new TreeNode[node.Nodes.Count]; 67if (node.Nodes.Count == 0) 92TreeNode[] nodesArray = new TreeNode[node.Nodes.Count];
System\Windows\Forms\Controls\TreeView\TreeView.cs (6)
1236if (Sorted && TreeViewNodeSorter is null && Nodes.Count >= 1) 2332TreeNode[] nodes = new TreeNode[Nodes.Count]; 2407s += $", Nodes.Count: {Nodes.Count}"; 2408if (Nodes.Count > 0) 2666for (int i = node.Nodes.Count - 1; i >= 0; i--) 2674for (int i = node.Nodes.Count - 1; i >= 0; i--)
System\Windows\Forms\Controls\TreeView\TreeView.TreeViewAccessibleObject.cs (3)
41this.TryGetOwnerAs(out TreeView? owningTreeView) ? owningTreeView.Nodes.Count : base.GetChildCount(); 51&& owningTreeView.Enabled && owningTreeView.Nodes.Count == 0), 111owningTreeView.Nodes.Count != 0;
System.Windows.Forms.Design (19)
System\ComponentModel\Design\ObjectSelectorEditor.Selector.cs (2)
142int length = nodes.Count; 159if ((treeNodes[i].Nodes is not null) && (treeNodes[i].Nodes.Count != 0))
System\Windows\Forms\Design\DesignBindingPicker.cs (9)
550if (_projectNode.Nodes.Count > 0) 555if (_instancesNode.Nodes.Count > 0) 560if (_otherNode.Nodes.Count > 0) 846Debug.Assert(nodes.Count == 0, "We only add data member content sub-nodes once."); 1614_helpTextCtrl.Text = (_treeViewCtrl?.Nodes.Count > 1) ? (SR.DesignBindingPickerHelpGenPickMember) : ""; 1616else if (_treeViewCtrl?.Nodes.Count > 1 && _treeViewCtrl.Nodes[1] is DataSourceNode) 1621else if (_instancesNode.Nodes.Count > 0 || _projectNode?.Nodes.Count > 0) 1715int dataMemberCount = _selectedNode.Nodes.Count;
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (8)
90TreeNode lastNode = _treeView1.Nodes[_treeView1.Nodes.Count - 1]; 91while (lastNode.Nodes.Count > 0) 93lastNode = lastNode.Nodes[lastNode.Nodes.Count - 1]; 597if (_treeView1.Nodes.Count == 0) 608object[] values = new object[_treeView1.Nodes.Count]; 634if (tempNode.Index < parent.Nodes.Count) 691bool nodesExist = _treeView1.Nodes.Count > 0; 698&& _curNode != _treeView1.Nodes[_treeView1.Nodes.Count - 1];
System.Windows.Forms.Tests (27)
System\Windows\Forms\AccessibleObjects\TreeView.TreeViewAccessibleObjectTests.cs (1)
102AccessibleObject expected = index >= 0 && index < control.Nodes.Count
System\Windows\Forms\TreeNodeTests.cs (2)
4729clonedNode.Nodes.Count.Should().Be(treeNode.Nodes.Count);
System\Windows\Forms\TreeViewTests.cs (24)
6838Assert.Equal(3, treeView.Nodes.Count); 6844Assert.Equal(2, treeView.Nodes.Count); 6863for (int count = treeView.Nodes.Count; count > 1; count -= 1) 6868Assert.Equal(count, treeView.Nodes.Count); 6875Assert.Equal(count, treeView.Nodes.Count); 6901Assert.Equal(3, treeNode.Nodes.Count); 6907Assert.Equal(2, treeNode.Nodes.Count); 6929for (int count = treeNode.Nodes.Count; count > 1; count -= 1) 6934Assert.Equal(count, treeNode.Nodes.Count); 6941Assert.Equal(count, treeNode.Nodes.Count); 6990Assert.Equal(3, treeView.Nodes.Count); 6995Assert.Equal(2, treeView.Nodes.Count); 7012for (int count = treeView.Nodes.Count; count > 1; count -= 1) 7018Assert.Equal(count, treeView.Nodes.Count); 7024Assert.Equal(count, treeView.Nodes.Count); 7043Assert.Equal(3, treeNode.Nodes.Count); 7048Assert.Equal(2, treeNode.Nodes.Count); 7068for (int count = treeNode.Nodes.Count; count > 1; count -= 1) 7074Assert.Equal(count, treeNode.Nodes.Count); 7080Assert.Equal(count, treeNode.Nodes.Count); 7242Assert.Equal(3, fifthSubNode1.Nodes.Count); 7243Assert.Equal(2, parent.Nodes[0].Nodes.Count); 7287Assert.Equal(4, parent.Nodes.Count); 7299Assert.Equal(2, parent.Nodes.Count);