NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Array.Clear

Sets a range of elements in the Array to 0 or a null reference (in Visual Basic Nothing).

[Visual Basic]
Public Shared Sub Clear( _
   ByVal array As Array, _
   ByVal index As Integer, _
   ByVal length As Integer _
)
[C#]
public static void Clear(
   Array array,
   int index,
   int length
);
[C++]
public: static void Clear(
   Array* array,
   int index,
   int length
);
[JScript]
public static function Clear(
   array : Array,
   index : int,
   length : int
);

Parameters

array
The Array whose elements would be cleared.
index
The starting index of the range of elements to clear.
length
The number of elements to clear.

Return Value

None.

Exceptions

Exception Type Condition
ArgumentNullException array is a null reference (Nothing).
ArgumentOutOfRangeException index is less than 0.

-or-

length is less than 0.

-or-

The sum of index and length is greater than the size of the Array.

Remarks

Reference-type elements are set to a null reference (Nothing). Value-type elements are set to 0.

See Also

Array Class | Array Members | System Namespace