Share via


System.Collections.IList.Clear Method

Sets all of the objects in a specific array to 0 (zero), to false, or to a null reference, depending on the object type.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

void System.Collections.IList.Clear ()

Remarks

Reference-type objects are set to a null reference; Boolean-type objects are set to false; other value-type objects are set to 0 (zero).

This method clears only the objects' values; it does not remove the objects themselves. Because the array has a fixed size, you cannot add objects to it or remove objects from it.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, 4.1, and 4.2.

See Also

Reference

Array Class
Array Members
System Namespace