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 );
None.
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. |
Reference-type elements are set to a null reference (Nothing). Value-type elements are set to 0.