[This is preliminary documentation and is subject to change.]
Adds range of items into list
Namespace: Tools.CollectionsT.GenericTAssembly: Tools (in Tools.dll) Version: 1.5.3.38916 (1.5.3.38916)
Syntax
| C# |
|---|
public virtual void AddRange( IEnumerable<T> Items ) |
| Visual Basic |
|---|
Public Overridable Sub AddRange ( _ Items As IEnumerable(Of T) _ ) |
| Visual C++ |
|---|
public: virtual void AddRange( IEnumerable<T>^ Items ) |
| F# |
|---|
abstract AddRange : Items:IEnumerable<'T> -> unit override AddRange : Items:IEnumerable<'T> -> unit |
| JScript |
|---|
public function AddRange( Items : IEnumerable<T> ) |
Parameters
- Items
- Type: System.Collections.Generic..::..IEnumerable<(Of <(<'T>)>)>
Collection of items to be added
Remarks
Internally calls Add(T) for each item.
If an exception occures in Add(T) or event handler than no item is added.
Items can safelly be null.
Exceptions
| Exception | Condition |
|---|---|
| System..::..InvalidOperationException | Locked is True |
| System..::..OperationCanceledException | Operation is canceled in eventhandler and CancelError is true |
| System..::..Exception | Any Exception can be thrown by event handler of the Adding event -or- Any excption may be thrown by OnAdding(ICollection, Nullable<(Of <<'(Int32>)>>), Boolean) when AllowItemCancel is true. |