IVariantArray Interface

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
Method Add Add an element.
Read-only property Count The element count.
Read/write property Element An element in the array.
Method Insert Add an element at the specified posiiton.
Method Remove Removes element at the specified position.
Method 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.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.