다음을 통해 공유


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)
Available in Sandboxed Solutions: No

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