Return the elements within the specified range.
[Visual Basic .NET] |
---|
Public Function Range( _ ByVal StartIndex As Integer, _ ByVal StopIndex As Integer _ ) As System.Array |
[C#] |
---|
public System.Array Range( int StartIndex, int StopIndex ); |
[Managed C++] |
---|
public: System::Array Range( int StartIndex, int StopIndex ); |
[Java] |
---|
public VariantArray range( int StartIndex, int StopIndex ); |
[Unmanaged C++] |
---|
public: HRESULT Range( long StartIndex, long StopIndex, SAFEARRAY * * pVar ); |
- StartIndex
- Start position of the range. one represents the first element of the collection.
- StopIndex
- End position of the range. The Count property represents the last element of the collection.
Array of variants [COM] or objects [.NET].
The purpose of this method is to avoid marshalling round-trips (marshalling occurs when the STK X controls are used in .NET or Java).
If the collection contains lots of elements, iterating using the For Each statement or the Item method may be slow. Using the Range method enables you to transfer several elements in one round-trip improving performance.
[Visual Basic .NET] | ||
---|---|---|
|