EwsDownloadItems Method (FolderId, Int32, Int32, Boolean)
Downloads items in the specified folder in the specified range.

Namespace: MailBee.EwsMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public EwsItemList DownloadItems(
	FolderId id,
	int startIndex,
	int count,
	bool unreadOnly
)

Parameters

id
Type: FolderId
The ID of the folder. Null reference (Nothing in Visual Basic) not allowed.
startIndex
Type: SystemInt32
The zero-based index of the first message in the range to be downloaded.
count
Type: SystemInt32
Number of items to be downloaded.
unreadOnly
Type: SystemBoolean
If true, only unread items are considered for download; otherwise, all the items.

Return Value

Type: EwsItemList
The list of items in the given folder, or a null reference (Nothing in Visual Basic) on error.
Exceptions
ExceptionCondition
MailBeeExceptionAn error occurred and ThrowExceptions is true.
NotImplementedExceptionThe .NET runtime is .NET Core.
Remarks

To specify the folder by its name, first get its ID with FindFolderIdByShortName(FolderId, String) or FindFolderIdByFullName(String) method.

Note Note
This overload downloads only basic properties of Exchange items. You need to use other overloads (such as those accepting the parameter of EwsItemParts type) to get full e-mail messages.
Note Note
In EWS, message indices start from 0 while in IMAP and POP3 they start from 1. Also, items are returned in the default sorting order which usually means "newer first" in Exchange. In IMAP/POP3, "older first" is the default. To change sorting order, use overloads accepting the parameter of ItemView type.
Note Note
This method is not implemented in .NET Core. Use DownloadItemsAsync(FolderId, Int32, Int32, Boolean) instead.
See Also