EwsFindFolderIdByFullName Method (String, Int32)
Gets the ID of the given folder in the MS Exchange account.

Namespace: MailBee.EwsMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public FolderId FindFolderIdByFullName(
	string folderFullName,
	int recursionLevel
)

Parameters

folderFullName
Type: SystemString
The full folder name, such as "Inbox/Nested folder/Deeply nested folder". Null reference (Nothing in Visual Basic) or empty string not allowed.
recursionLevel
Type: SystemInt32
Specifies how many levels of folder hierarchy to scan in shallow mode before switching to deep traversal mode. If 0, the entire account will be searched in a single operation (deep traversal). Higher values increase the number of search queries to the server but make each query more lightweight. Negative values not allowed.

Return Value

Type: FolderId
The FolderId object if the folder exists; otherwise, a null reference (or if an error occurred and ThrowExceptions is false).
Exceptions
ExceptionCondition
MailBeeExceptionAn error occurred and ThrowExceptions is true.
NotImplementedExceptionThe .NET runtime is .NET Core.
Remarks

Key difference of this method from DownloadFolderByFullName(String, Int32) is that it returns just ID. This means that MailBee requests less info from the server making this method a bit more efficient. However, if you need the detailed info about the folder (e.g. message count, unseen count, etc), use DownloadFolderByFullName(String, Int32) instead.

Note Note
This overload exists only for optimization purposes when dealing with very complex and deeply nested folder hierarchies in Exchange accounts. DownloadFolderByFullName(String, Int32) topic provides more details on recursionLevel and how it can help improve performance.
Note Note
This method is not implemented in .NET Core. Use FindFolderIdByFullNameAsync(String, Int32) instead.
See Also