SPAlternateUrlCollection.Remove method

Deletes the specified URL from the collection if it exists in the collection, but if the URL does not exist, returns false instead of throwing an exception. 

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel := True)> _
Public Function Remove ( _
    url As SPAlternateUrl _
) As Boolean
'Usage
Dim instance As SPAlternateUrlCollection
Dim url As SPAlternateUrl
Dim returnValue As Boolean

returnValue = instance.Remove(url)
[SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel = true)]
public bool Remove(
    SPAlternateUrl url
)

Parameters

Return value

Type: System.Boolean
true if the URL exists in the collection and is successfully removed; otherwise, false.

Implements

ICollection<T>.Remove(T)

Remarks

If the URL is currently used for a response URL, the response URL for that zone is reset to a null reference (Nothing in Visual Basic).

See also

Reference

SPAlternateUrlCollection class

SPAlternateUrlCollection members

Microsoft.SharePoint.Administration namespace