Compartilhar via


SPAlternateUrlCollection.Ensure Method

Adds an incoming URL to the collection if it does not already exist in the collection.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Sub Ensure ( _
    alternateUrl As SPAlternateUrl _
)
'Usage
Dim instance As SPAlternateUrlCollection
Dim alternateUrl As SPAlternateUrl

instance.Ensure(alternateUrl)
public void Ensure(
    SPAlternateUrl alternateUrl
)

Parameters

Remarks

If the specified incoming URL does already exist in the collection, calling the Ensure method does not throw an exception. 

See Also

Reference

SPAlternateUrlCollection Class

SPAlternateUrlCollection Members

Microsoft.SharePoint.Administration Namespace