Upraviť

Zdieľať cez


Array.IList.Add(Object) Method

Definition

Calling this method always throws a NotSupportedException exception.

 virtual int System.Collections.IList.Add(System::Object ^ value) = System::Collections::IList::Add;
int IList.Add (object value);
abstract member System.Collections.IList.Add : obj -> int
override this.System.Collections.IList.Add : obj -> int
Function Add (value As Object) As Integer Implements IList.Add

Parameters

value
Object

The object to be added to the IList.

Returns

Adding a value to an array is not supported. No value is returned.

Implements

Exceptions

The IList has a fixed size.

Remarks

Ordinarily, an IList.Add implementation adds a member to a collection. However, because arrays have a fixed size (the IsFixedSize property always returns true), this method always throws a NotSupportedException exception.

This member is an explicit interface member implementation. It can be used only when the Array instance is cast to an IList interface.

Applies to