Provides access to members that control variant arrays.
Description
The IVariantArray interface provides methods and properties for inserting, removing and accessing elements in a VarArray via a zero-based index.
Members
Name | Description | |
---|---|---|
Add | Add an element. | |
Count | The element count. | |
Element | An element in the array. | |
Insert | Add an element at the specified posiiton. | |
Remove | Removes element at the specified position. | |
RemoveAll | Removes all elements. |
IVariantArray.Add Method
Add an element.
Public Sub Add ( _
    ByVal Element As Object _
)
public void Add (
    object Element
);
Description
Adds the element to the end of the array.
IVariantArray.Count Property
The element count.
Public ReadOnly Property Count As Integer
public int Count {get;}
Description
Returns the number of elements in the array.
IVariantArray.Element Property
An element in the array.
Public Function get_Element ( _
    ByVal Index As Integer _
) As Object
Public Sub set_Element ( _
    ByVal Index As Integer, _
    ByVal Element As Object _
)
public object get_Element (
    int Index
);
public void set_Element (
    int Index,
    object Element
);
Description
Returns or sets the element at the specified index in the array. The element at the beginning or the array has an index of 0, and the element at the end of the array has in index of Count - 1.
IVariantArray.Insert Method
Add an element at the specified posiiton.
Public Sub Insert ( _
    ByVal Index As Integer, _
    ByVal Element As Object _
)
public void Insert (
    int Index,
    object Element
);
Description
Adds the element to the array at the specified index. The element at the beginning or the array has an index of 0, and the element at the end of the array has in index of Count - 1.
IVariantArray.Remove Method
Removes element at the specified position.
Public Sub Remove ( _
    ByVal Index As Integer _
)
public void Remove (
    int Index
);
Description
Removes the element at the specified index from the array. The element at the beginning or the array has an index of 0, and the element at the end of the array has in index of Count - 1.
IVariantArray.RemoveAll Method
Removes all elements.
Public Sub RemoveAll ( _
)
public void RemoveAll (
);
Description
Removes all of the elements from the array.
Classes that implement IVariantArray
Classes | Description |
---|---|
VarArray | An object for holding a Variant array. |