public static bool TryAddRange<T>(
this IEnumerable<T> target,
IEnumerable<T> collection,
bool checkReadOnly = true,
bool throwError = true
)
<ExtensionAttribute>
Public Shared Function TryAddRange(Of T) (
target As IEnumerable(Of T),
collection As IEnumerable(Of T),
Optional checkReadOnly As Boolean = true,
Optional throwError As Boolean = true
) As Boolean
public:
[ExtensionAttribute]
generic<typename T>
static bool TryAddRange(
IEnumerable<T>^ target,
IEnumerable<T>^ collection,
bool checkReadOnly = true,
bool throwError = true
)
[<ExtensionAttribute>]
static member TryAddRange :
target : IEnumerable<'T> *
collection : IEnumerable<'T> *
?checkReadOnly : bool *
?throwError : bool
(* Defaults:
let _checkReadOnly = defaultArg checkReadOnly true
let _throwError = defaultArg throwError true
*)
-> bool
The specified collection can be added to the target collection if that is either an ICollectionT, IProducerConsumerCollectionT or IList implementation.
If target is neither a ListT nor an ISupportsRangeCollectionT implementation, then the elements of collection will only be added one by one.