Share via


IReadWriteLocator.Remove Method

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Unity Application Block information can be found at the Unity Application Block site.

Removes an object from the locator.

Namespace:  Microsoft.Practices.ObjectBuilder2
Assembly:  Microsoft.Practices.ObjectBuilder2 (in Microsoft.Practices.ObjectBuilder2.dll)

Syntax

'Declaration
Function Remove ( _
    key As Object _
) As Boolean
bool Remove(
    Object key
)
bool Remove(
    Object^ key
)
function Remove(
    key : Object
) : boolean

Parameters

  • key
    Type: System.Object
    The key under which the object was registered.

Return Value

Returns true if the object was found in the locator; returns false otherwise.

Exceptions

Exception Condition
System.ArgumentNullException key is null.

See Also

IReadWriteLocator Interface

Microsoft.Practices.ObjectBuilder2 Namespace