Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

IQueue.Add Method

Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions, returning upon success and throwing an InvalidOperationException if no space is currently available.

[Visual Basic]
Public Sub Add( _
   ByVal objectToAdd As Object _
)
[C#]
bool Add(
   object objectToAdd
);

Parameters

objectToAdd
The element to add.

Return Value

if successful.

Exceptions

Exception Type Condition
InvalidOperationException If the element cannot be added at this time due to capacity restrictions.
InvalidCastException If the class of the supplied objectToAdd prevents it from being added to this queue.
ArgumentNullException If the specified element is and this queue does not permit elements.
ArgumentException If some property of the supplied objectToAdd prevents it from being added to this queue.

See Also

IQueue Interface | Spring.Collections Namespace