50 references to List
System.Windows.Forms (33)
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (22)
88return CurrencyManager is { List: IBindingList { SupportsChangeNotification: true }, AllowAdd: true }; 99return CurrencyManager is { AllowRemove: true, List: IBindingList { SupportsChangeNotification: true } }; 120public IList? List => CurrencyManager?.List; 302if (CurrencyManager?.List is not IBindingList { SupportsSorting: true, IsSorted: true }) 341Debug.Assert(DataBoundRowsCount() == CurrencyManager!.List!.Count || (_owner.Columns.Count == 0 && dataGridViewRowsCount == 0), 474Debug.Assert(CurrencyManager?.List is not null); 475if (_dataConnectionState[DATACONNECTIONSTATE_inDeleteOperation] && CurrencyManager.List.Count == 0) 492Debug.Assert(CurrencyManager?.List is not null); 494&& CurrencyManager.List.Count == (_owner.AllowUserToAddRowsInternal ? _owner.Rows.Count - 1 : _owner.Rows.Count)) 508Debug.Assert(CurrencyManager.List.Count == 1); 529Debug.Assert(CurrencyManager!.List!.Count == 0, "we deleted the row that the Child table forcefully added"); 551Debug.Assert(CurrencyManager?.List is not null); 552if (CurrencyManager.List.Count == DataBoundRowsCount()) 736Debug.Assert(CurrencyManager?.List is not null); 737if (CurrencyManager.List is IBindingList ibl && ibl.SupportsSorting && ibl.IsSorted) 828Debug.Assert(CurrencyManager?.List is not null); 829if (_owner.NewRowIndex == CurrencyManager.List.Count) 837Debug.Assert(_owner.NewRowIndex == CurrencyManager.List.Count - 1); 974if (CurrencyManager?.List is not IBindingList { SupportsSorting: true, IsSorted: true } ibl) 1291if (CurrencyManager!.Position >= 0 && CurrencyManager.Position < CurrencyManager.List!.Count) 1304if (CurrencyManager.Position >= 0 && CurrencyManager.Position < CurrencyManager.List!.Count) 1394Debug.Assert(DataBoundRowsCount() == CurrencyManager.List!.Count, "if the back end was changed while in AddNew the DGV should have updated its rows collection");
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
19956int rowCount = DataConnection!.CurrencyManager?.List.Count ?? 0;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (4)
1423if ((DataManager.List is IBindingList bindingList) && bindingList.SupportsSearching) 1428item = DataManager.List[index]; 1434for (int i = 0; i < DataManager.List.Count; i++) 1436object? itemTmp = DataManager.List[i];
System\Windows\Forms\Controls\ListControl\ListControl.cs (3)
411SetItemsCore(_dataManager.List); 686IList? currentList = DataManager?.List; 745if (displayMemberChanged || (force && (currentList != _dataManager.List || currentManagerIsNull)))
System\Windows\Forms\DataBinding\BindingManagerBase.cs (1)
81list = currencyManager.List;
System\Windows\Forms\DataBinding\CurrencyManager.cs (2)
134internal override Type BindType => ListBindingHelper.GetListItemType(List); 1052if (e.NewIndex <= _lastGoodKnownRow && _lastGoodKnownRow < List.Count - 1)
System.Windows.Forms.Tests (17)
System\Windows\Forms\BindingContextTests.cs (10)
420Assert.Same(dataSource, manager.List); 434Assert.Same(dataSource, manager.List); 453Assert.Same(dataSource, manager.List); 580Assert.Same(list, manager.List); 617Assert.Same(list, manager.List); 639Assert.Same(list, manager.List); 824Assert.Same(dataSource, manager.List); 862Assert.Same(list, manager.List); 919Assert.Same(dataSource, manager1.List); 926Assert.Same(dataSource, manager2.List);
System\Windows\Forms\BindingSourceTests.cs (7)
27Assert.Same(source, source.CurrencyManager.List); 86Assert.Same(source, source.CurrencyManager.List); 151Assert.Same(source, source.CurrencyManager.List); 237Assert.Same(source, source.CurrencyManager.List); 307Assert.Same(source, source.CurrencyManager.List); 416Assert.Same(source, source.CurrencyManager.List); 490Assert.Same(source, source.CurrencyManager.List);