ReadOnlyCollection<T>.IList.Add(Object) 方法

定義

將項目加入至 IListAdds an item to the IList. 這個實作一律會擲回 NotSupportedExceptionThis implementation always throws NotSupportedException.

 virtual int System.Collections.IList.Add(System::Object ^ value) = System::Collections::IList::Add;
int IList.Add (object value);
Function Add (value As Object) As Integer Implements IList.Add

參數

value
Object

要加入至 ObjectIListThe Object to add to the IList.

傳回

插入新項目的位置。The position into which the new element was inserted.

實作

例外狀況

一律擲回。Always thrown.

備註

這個成員是明確介面成員實作,This member is an explicit interface member implementation. 只有在 ReadOnlyCollection<T> 執行個體轉換成 IList 介面時,才能使用這個成員。It can be used only when the ReadOnlyCollection<T> instance is cast to an IList interface.

適用於