Share via


SPFolderHierarchy.TryGetFolder method

TryGetFolder Gets a folder by url, or null if the folder doesn't exist.

Namespace:  Microsoft.Office.Server.Utilities
Assembly:  Microsoft.Office.Server (in Microsoft.Office.Server.dll)

Syntax

'Declaration
Public Function TryGetFolder ( _
    strFolderUrl As String, _
    <OutAttribute> ByRef folder As SPFolder _
) As Boolean
'Usage
Dim instance As SPFolderHierarchy
Dim strFolderUrl As String
Dim folder As SPFolder
Dim returnValue As Boolean

returnValue = instance.TryGetFolder(strFolderUrl, _
    folder)
public bool TryGetFolder(
    string strFolderUrl,
    out SPFolder folder
)

Parameters

Return value

Type: System.Boolean
Returns Boolean.

See also

Reference

SPFolderHierarchy class

SPFolderHierarchy members

Microsoft.Office.Server.Utilities namespace