FolderInfo.GetContents

GetContents(bool)

Get collection of messages.

public MessageInfoCollection GetContents(bool tryToReadCorruptedContents)
ParameterTypeDescription
tryToReadCorruptedContentsBooleanIf the value of this parameter is true, the method will try to read the content even if the file is corrupted. This value can be used if the GetContents() method throws an exception about the file corruption. If the value of this parameter is false, the method works in the same way as GetContents() method without parameters.

Return Value

Collection of MessageInfo.

See Also


GetContents()

Get collection of messages.

public MessageInfoCollection GetContents()

Return Value

Collection of MessageInfo.

See Also


GetContents(MessageKind)

Get collection of messages.

public MessageInfoCollection GetContents(MessageKind kind)
ParameterTypeDescription
kindMessageKindThe message kind.

Return Value

Collection of MessageInfo.

See Also


GetContents(MailQuery)

Get collection of messages.

public MessageInfoCollection GetContents(MailQuery query)
ParameterTypeDescription
queryMailQueryMailQuery that represents search query.

Return Value

Collection of MessageInfo.

See Also


GetContents(int, int)

Gets the collection of messages.

public MessageInfoCollection GetContents(int startIndex, int count)
ParameterTypeDescription
startIndexInt32The start message index.
countInt32The number of messages that will be retrieved.

Return Value

Collection of MessageInfo.

Exceptions

exceptioncondition
ArgumentOutOfRangeExceptionthrows, if startIndex less than 0.
ArgumentOutOfRangeExceptionthrows, if startIndex more or equal to total message count that folder contains.

Remarks

If “count” param is less than 0 or more than remained message count then remained message count will be returned.

See Also