EwsFolderExists Method (FolderId, String)
Checks if the given folder in the specified containing folder exists 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 bool FolderExists(
	FolderId parentFolderId,
	string folderName
)

Parameters

parentFolderId
Type: FolderId
The ID of the parent folder where to search for the given folder. If a null reference (Nothing in Visual Basic), RootFolderType will be assumed.
folderName
Type: SystemString
The folder name. Null reference or empty string not allowed.

Return Value

Type: Boolean
true if the folder exists; otherwise, false (or if an error occurred and ThrowExceptions is false).
Exceptions
ExceptionCondition
MailBeeExceptionAn error occurred and ThrowExceptions is true.
Remarks

parentFolderId must be the immediate parent of folderName folder. Also, folderName must be a short name (not a full name with nested folder names in it). You can use FolderExists(string) overload to search for a folder by its full name.

To get the folder itself (not just the fact whether it exists or not), use DownloadFolderByShortName(FolderId, String) method.

See Also