'Declaration Public Sub AddRange( _ ByVal bindings() As ScheduleDataBinding _ )
public void AddRange( ScheduleDataBinding[] bindings )
Exception | Description |
---|---|
System.ArgumentNullException | Thrown when the supplied bindings collection is null (Nothing in Visual Basic .NET). |
The precedence in which ScheduleDataBindings are processed is determined by the order in which they were added to the DataBindingCollection. Developers must place those ScheduleDataBindings of higher priority at the front of the collection specified by bindings in order to achieve the effect of some data binding objects taking precedence over those added later.
In order to supercede the precedence defined by the base data provider class, it is sometimes necessary to call Clear on the DataBindingCollection and re-add the ScheduleDataBindings (including those present by default for a particular operation) to the collection.
The AddRange method does not perform the same duplicate type checking as it's counterpart Add method does. This is because the AddRange method is intended for use to perform batch updates to the DataBindingCollection. The developer must exercise greater caution when using AddRange that they do not register duplicate types of ScheduleDataBinding, or undefined behavior may result. Commonly, a call to AddRange only takes place immediately following a call to Clear, in which these relaxed constraints can be guaranteed safe. Another use of AddRange that can be deterministically safe is when the developer is adding only types of ScheduleDataBinding that they have custom created for themselves.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2