Array.IList.Add(Object) Method

Definition

呼叫這個方法一律會擲回 NotSupportedException 例外狀況。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

要加入 IList 的物件。The object to be added to the IList.

Returns

Int32

不支援將值加入陣列。Adding a value to an array is not supported. 沒有傳回值。No value is returned.

Implements

Exceptions

IList 具有固定的大小。The IList has a fixed size.

Remarks

一般來說,IList.Add 的執行會將成員加入至集合。Ordinarily, an IList.Add implementation adds a member to a collection. 不過,因為陣列具有固定的大小(IsFixedSize 屬性一律會傳回 true),所以這個方法一律會擲回 NotSupportedException 例外狀況。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. 只有在 Array 執行個體轉換成 IList 介面時,才能使用這個成員。It can be used only when the Array instance is cast to an IList interface.

Applies to