OPC Studio User's Guide and Reference
ElasticVector Class
Members 



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Collections Namespace : ElasticVector Class
A one-dimensional array that expands its bounds elastically.
Syntax
'Usage
 
Dim instance As ElasticVector
[DefaultMember("Item")]
[CLSCompliant(true)]
[ComDefaultInterface(OpcLabs.BaseLib.Collections.ComTypes._ElasticVector)]
[ComVisible(true)]
[Guid("E6AB098E-533E-41FB-A1C1-18182F452045")]
[TypeConverter(System.ComponentModel.ExpandableObjectConverter)]
[Serializable()]
public ref class ElasticVector : public OpcLabs.BaseLib.Collections.ComTypes._ElasticVector, OpcLabs.BaseLib.Collections.ComTypes._List, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList, System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable, System.ICloneable  
Remarks

The vector can grow automatically with certain operations. It does not shrink by itself. The growing consists of lowering the lower bound or increasing the upper bound as necessary for the operation. The absolute element indexes remain unchanged, even when the lower bound changes.

Besides its elasticity, this class is also designed to be conveniently usable for working around limitations of some COM tools and languages that cannot handle construction or deconstruction of proper arrays for method arguments and return values.

For passing an array into a COM method, the developer can create ElasticVector, fill it with elements, and then use its ToArray method to obtain the underlying array object, and pass it to the COM method. Conversely, the developer can create ElasticVector, call its Assign method with the method return value, and then use methods such as GetAt to retrieve the elements.

Inheritance Hierarchy

System.Object
   OpcLabs.BaseLib.Collections.ElasticVector

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