8 writes to Count
System.ComponentModel.TypeConverter (8)
System\ComponentModel\PropertyDescriptorCollection.cs (8)
41Count = 0; 46Count = properties.Length; 69Count = propCount; 107_properties[Count++] = value; 118Count = 0; 159Count = 0; 247Count++; 277Count--;
126 references to Count
PresentationFramework (2)
MS\Internal\Data\PropertyPathWorker.cs (1)
1475if (0 <= index && index < properties.Count)
System\Windows\Data\BindingListCollectionView.cs (1)
2196if ((pdc == null) || (pdc.Count == 0))
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\Validator.cs (1)
520var items = new List<KeyValuePair<ValidationContext, object?>>(properties.Count);
System.ComponentModel.TypeConverter (33)
System\ComponentModel\Design\DesignerOptionService.cs (1)
184propList = new ArrayList(props.Count);
System\ComponentModel\PropertyDescriptorCollection.cs (32)
85if (index >= Count) 106EnsureSize(Count + 1); 108return Count - 1; 127Array.Copy(_properties, 0, array, index, Count); 137PropertyDescriptor[] newProps = new PropertyDescriptor[Count]; 138Array.Copy(_properties, newProps, Count); 168Array.Copy(_properties, newProps, Count); 206for (int i = 0; i < Count; i++) 232public int IndexOf(PropertyDescriptor? value) => Array.IndexOf(_properties, value, 0, Count); 241EnsureSize(Count + 1); 242if (index < Count) 244Array.Copy(_properties, index, _properties, index + 1, Count - index); 272if (index < Count - 1) 274Array.Copy(_properties, index + 1, _properties, index, Count - index - 1); 276_properties[Count - 1] = null!; 286return new PropertyDescriptorCollection(_properties, Count, _namedSort, _comparer); 296return new PropertyDescriptorCollection(_properties, Count, names, _comparer); 305return new PropertyDescriptorCollection(_properties, Count, names, comparer); 314return new PropertyDescriptorCollection(_properties, Count, _namedSort, comparer); 393if (_properties.Length != Count) 395PropertyDescriptor[] enumProps = new PropertyDescriptor[Count]; 396Array.Copy(_properties, enumProps, Count); 406int ICollection.Count => Count; 469if (index < 0 || index >= Count) 476for (int i = 0; i < Count; i++) 510string[] keys = new string[Count]; 511for (int i = 0; i < Count; i++) 524if (_properties.Length != Count) 526PropertyDescriptor[] newProps = new PropertyDescriptor[Count]; 527Array.Copy(_properties, newProps, Count); 573if (index >= Count) 616if (_index < (_owner.Count - 1))
System.Data.Common (2)
System\Data\Common\DbConnectionStringBuilder.cs (1)
550PropertyDescriptor[] propertiesArray = new PropertyDescriptor[propertyDescriptors.Count];
System\Data\xmlsaver.cs (1)
124for (int i = 0; i < pds.Count; i++)
System.Drawing.Common.Tests (8)
System\Drawing\FontConverterTests.cs (1)
103string[] propNames = new string[props.Count];
System\Drawing\ImageConverterTests.cs (7)
233Assert.Equal(allPropertiesCount, propsColl.Count); 237Assert.Equal(browsablePropertiesCount, propsColl.Count); 239Assert.Equal(browsablePropertiesCount, propsColl.Count); 243Assert.Equal(allPropertiesCount, propsColl.Count); 247Assert.Equal(allPropertiesCount, propsColl.Count); 251Assert.Equal(browsablePropertiesCount, propsColl.Count); 253Assert.Equal(browsablePropertiesCount, propsColl.Count);
System.Windows.Forms (31)
System\Windows\Forms\ActiveX\AxHost.cs (1)
2590for (int i = 0; i < baseProps.Count; ++i)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
1049for (int i = 0; i < props.Count; i++) 1503for (int i = 0; i < props.Count; i++)
System\Windows\Forms\ComponentModel\COM2Interop\Com2PropertyDescriptor.Com2PropDescMainConverter.cs (2)
55if (properties is not null && properties.Count > 0) 59PropertyDescriptor[] descriptors = new PropertyDescriptor[properties.Count];
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (4)
288for (int i = 0; i < _props.Count; i++) 936List<DataGridViewColumn> cols = new(_props.Count); 938for (int i = 0; i < _props.Count; i++) 1205for (int i = 0; i < _props.Count; i++)
System\Windows\Forms\Controls\ListControl\ListControl.cs (2)
264for (int i = 0; i < props.Count; i++) 277for (int i = 0; i < props.Count; i++)
System\Windows\Forms\Controls\MonthCalendar\SelectionRangeConverter.cs (2)
104string?[] args = new string[props.Count]; 106for (int i = 0; i < props.Count; i++)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (4)
1324var propertyDescriptors = new PropertyDescriptor[properties.Count]; 1330if (defaultProperty is null && properties.Count > 0) 1338if ((properties is null || properties.Count == 0) && objectType is not null && objectType.IsArray && value is not null) 1358entries = new GridEntry[properties.Count];
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\ImmutablePropertyDescriptorGridEntry.cs (2)
57Hashtable values = new Hashtable(properties.Count); 58for (int i = 0; i < properties.Count; i++)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiSelectRootGridEntry.PropertyMerger.cs (3)
140for (int i = 0; i < objectProperties[0].Count; i++) 148if (positions[j] >= objectProperties[j].Count) 197if (position < objectProperties[j].Count)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertiesTab.cs (1)
26for (int i = 0; i < properties.Count; i++)
System\Windows\Forms\DataBinding\Binding.cs (1)
505for (int i = 0; i < propInfos.Count; i++)
System\Windows\Forms\DataBinding\BindingManagerBase.cs (1)
165for (int j = 0; j < itemProps.Count; j++)
System\Windows\Forms\DataBinding\BindingSource.cs (2)
1329for (int j = 0; j < _itemShape.Count; j++) 1340for (int j = 0; j < _itemShape.Count; j++)
System\Windows\Forms\DataBinding\ListBindingHelper.cs (1)
641if (!(enumerable is IList) && pdc.Count == 0)
System\Windows\Forms\Design\EventsTab.cs (3)
132if (matchingComponentProperties.Count == 0) 163var mergedEvents = new PropertyDescriptor[componentEventProperties.Count + matchingPropertyEvents.Count]; 165matchingPropertyEvents.CopyTo(mergedEvents, componentEventProperties.Count);
System.Windows.Forms.Design (11)
System\ComponentModel\Design\ComponentDesigner.cs (1)
414PropertyDescriptor[] values = new PropertyDescriptor[properties.Count];
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
2174PropertyDescriptor[] propArray = new PropertyDescriptor[props.Count];
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (1)
673propArray = new PropertyDescriptor[props.Count];
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
725for (int i = 0; i < propertyDescriptorCollection.Count; i++)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (2)
1280for (int i = 0; i < props.Count; i++) 1294propArray = new PropertyDescriptor[props.Count + 1];
System\Windows\Forms\Design\DataGridViewDesigner.cs (2)
623columnsToBeAdded = new List<DataGridViewColumn>(backEndProps!.Count); 624for (int i = 0; i < backEndProps.Count; i++)
System\Windows\Forms\Design\DesignBindingPicker.cs (3)
677if (_showDataMembers && properties?.Count == 0) 764for (int i = 0; i < properties.Count; ++i) 862for (int i = 0; i < properties.Count; ++i)
System.Windows.Forms.Tests (38)
System\Windows\Forms\AxHostTests.cs (12)
2887Assert.True(properties.Count > 1); 2893Assert.True(properties.Count > 1); 2913Assert.True(properties.Count > 1); 2922Assert.True(properties.Count > 1); 2936Assert.True(properties.Count > 1); 2942Assert.True(properties.Count > 1); 2961Assert.True(properties.Count > 1); 2970Assert.True(properties.Count > 1); 2984Assert.True(properties.Count > 1); 2990Assert.True(properties.Count > 1); 3009Assert.True(properties.Count > 1); 3018Assert.True(properties.Count > 1);
System\Windows\Forms\AxWebBrowserTests.cs (1)
31properties.Count.Should().BeGreaterThan(0);
System\Windows\Forms\ColumnHeaderConverterTests.cs (2)
154Assert.Equal(TypeDescriptor.GetProperties(item, null).Count, converter.GetProperties(null, item, null).Count);
System\Windows\Forms\ComponentModel\Com2Interop\ComNativeDescriptorTests.cs (4)
46Assert.Equal(5, properties.Count); 129Assert.Equal(25, properties.Count); 171Assert.Equal(4, properties.Count); 195Assert.Equal(4, properties.Count);
System\Windows\Forms\DockPaddingEdgesConverterTests.cs (1)
16Assert.Equal(5, properties.Count);
System\Windows\Forms\LinkAreaConverterTests.cs (1)
204Assert.Equal(2, properties.Count);
System\Windows\Forms\ListViewItemConverterTests.cs (2)
307Assert.Equal(TypeDescriptor.GetProperties(item, null).Count, converter.GetProperties(null, item, null).Count);
System\Windows\Forms\ListViewSubItemConverterTests.cs (2)
120Assert.Equal(TypeDescriptor.GetProperties(item, null).Count, converter.GetProperties(null, item, null).Count);
System\Windows\Forms\MonthCalendar.SelectionRangeConverterTests.cs (1)
157props.Count.Should().Be(2);
System\Windows\Forms\PaddingConverterTests.cs (1)
403Assert.Equal(5, properties.Count);
System\Windows\Forms\PropertyGridInternal\PropertiesTabTests.cs (10)
64Assert.Equal(2, properties.Count); 81Assert.Equal(2, properties.Count); 91Assert.Equal(3, properties.Count); 102Assert.Equal(1, properties.Count); 118Assert.Equal(2, properties.Count); 133Assert.Equal(2, properties.Count); 149Assert.Equal(2, properties.Count); 165Assert.Equal(1, properties.Count); 175Assert.Equal(3, properties.Count); 186Assert.Equal(1, properties.Count);
System\Windows\Forms\TableLayoutPanelCellPositionTests.cs (1)
316Assert.Equal(2, properties.Count);