Removes the first occurrence of the specified object from the current instance.
- obj
- The object to remove from the current instance.
Type Reason NotSupportedException The current instance is read-only or has a fixed size.
Note: This method is implemented to support the IList interface.Operation
As described above.This method determines equality by calling object.Equals(object).
If obj is found in the current instance, obj is removed from the current instance, the rest of the elements are shifted down to fill the position vacated by obj, the ArrayList.Count of the current instance is decreased by one, and the position that was previously the last element in the current instance is set to null. If obj is not found in the current instance, the current instance remains unchanged.
Note: For the default implementation, this method performs a linear search. On average, this is an O(n/2) operation, where n is ArrayList.Count of the current instance. The longest search is an O(n) operation.
Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0