Partager via


PSDataCollection<T>.IList.Add(Object) Method

Definition

Adds an element to the buffer.

 virtual int System.Collections.IList.Add(System::Object ^ value) = System::Collections::IList::Add;
 virtual int System.Collections.IList.Add(Platform::Object ^ value) = System::Collections::IList::Add;
int System.Collections.IList.Add(winrt::Windows::Foundation::IInspectable const & value);
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 add to the buffer.

Returns

The position into which the new element was inserted.

Implements

Exceptions

Objects cannot be added to a closed buffer. Make sure the buffer is open for Add and Insert operations to succeed.

value reference is null. (or) value is not of the correct generic type T for the buffer.

Applies to