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



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Collections.ComTypes Namespace > _ElasticVector Interface : 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.

The value of this parameter cannot be null (Nothing in Visual Basic).

Adds the elements of the specified sequence to the end of the elastic vector.
Syntax
'Declaration
 
Sub AddRange( _
   ByVal sequence As Object _
) 
'Usage
 
Dim instance As _ElasticVector
Dim sequence As Object
 
instance.AddRange(sequence)
void AddRange( 
   object sequence
)
void AddRange( 
   Object^ 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.

The value of this parameter cannot be null (Nothing in Visual Basic).

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.

This member or type is for use from COM. It is not meant to be used from .NET or Python. Refer to the corresponding .NET member or type instead, if you are developing in .NET or Python.

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