EwsEmptyFolder Method
Empties a folder with the specified ID.

Namespace: MailBee.EwsMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
Syntax
public bool EmptyFolder(
	FolderId id,
	bool deleteSubFolders
)

Parameters

id
Type: FolderId
The ID of the folder to empty. Null reference (Nothing in Visual Basic) not allowed.
deleteSubFolders
Type: SystemBoolean
If true, sub-folders will be deleted as well as items in the folder itself. Otherwise, only items in the folder itself will be deleted.

Return Value

Type: Boolean
true if succeeded; otherwise, false.
Exceptions
ExceptionCondition
MailBeeExceptionAn error occurred and ThrowExceptions is true.
NotImplementedExceptionThe .NET runtime is .NET Core.
Remarks

To empty a folder by its name, first locate its ID with FindFolderIdByShortName(FolderId, String) or FindFolderIdByFullName(String) method.

To control how items are deleted (e.g. to Trash or permanently), use DeleteMethod property.

Note Note
This method is not implemented in .NET Core. Use EmptyFolderAsync(FolderId, Boolean) instead.
See Also