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

Namespace: MailBee.EwsMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public FolderId FindFolderIdByFullName(
	FolderId containingFolderId,
	string folderFullName
)

Parameters

containingFolderId
Type: FolderId
The ID of the containing folder where to search for the given folder. If a null reference (Nothing in Visual Basic), RootFolderType will be assumed.
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.

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.
Remarks

To delimit levels of hierarchy in the folder name, use the same character which is set by FolderLevelDelimiter property. By default, it's '/' (forward slash).

containingFolderId is just for optimization so you can leave it a null reference. However, if you already know that the folder you're looking for is contained in some upper level folder, you can specify it there. This will optimize performance as only a subset of all folders in the account will be searched. If you don't know the containing folder, you can use another optimization provided by FindFolderIdByFullName(string, int) overload.

containingFolderId does not need to be the immediate parent of the folder you're looking for, it can be any level up (e.g. you can specify WellKnownFolderName.Inbox while searching for "Inbox/Nested folder/Deeply nested folder"). Still, more close containingFolderId's level is to folderFullName's level - faster the search will be.

Key difference of this method from DownloadFolderByFullName(FolderId, String) 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(FolderId, String) instead.

See Also