OPC Studio User's Guide and Reference
AddRange Method (ElasticVector)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Collections Namespace > ElasticVector Class : AddRange Method
The sequence whose elements should be added to the end of the elastic vector. The sequence itself cannot be null, but it can contain elements that are null.
Adds the elements of the specified sequence to the end of the elastic vector.
Syntax
'Declaration
 
Public Sub AddRange( _
   ByVal sequence As IEnumerable _
) 
'Usage
 
Dim instance As ElasticVector
Dim sequence As IEnumerable
 
instance.AddRange(sequence)
public void AddRange( 
   IEnumerable sequence
)
public:
void AddRange( 
   IEnumerable^ sequence
) 

Parameters

sequence
The sequence whose elements should be added to the end of the elastic vector. The sequence itself cannot be null, but it can contain elements that are null.
Remarks

This method can be used in certain COM tools (such as Xojo) to convert keyed collections (whose elements cannot otherwise be enumerated in such tools) to an elastic vector, from which all the elements can then be extracted by index.

Note that with an empty elastic vector, and an actual sequence argument that is an array, the AddRange method still differs from the Assign method in that the Assign method takes over the (lower and upper) dimensions of the input array into the elastic vector, while the AddRange method (on an empty elastic vector) always results in an elastic vector with zero LowerBound.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also