Begins asynchronous SelectFolder operation. Selects the specified folder so that its messages can be accessed.

Namespace:  Rebex.Net
Assembly:  Rebex.Imap (in Rebex.Imap.dll)

Syntax

Visual Basic
Public Function BeginSelectFolder ( _
	folder As String, _
	readOnly As Boolean, _
	callback As AsyncCallback, _
	state As Object _
) As IAsyncResult
C#
public IAsyncResult BeginSelectFolder(
	string folder,
	bool readOnly,
	AsyncCallback callback,
	Object state
)

Parameters

folder
Type: System..::..String
Folder to be selected.
readOnly
Type: System..::..Boolean
Specifies whether the folder is to be selected as read-only.
callback
Type: System..::..AsyncCallback
An optional asynchronous callback to be called when the operation is complete.
state
Type: System..::..Object
A user-provided object that identifies this particular asynchronous operation.

Return Value

An IAsyncResult that references the asynchronous operation.

Remarks

The CurrentFolder property will contain an instance of ImapFolder that represents the selected folder after a call to this method.

Only one mailbox can be selected at a time for a single connection, and only the messages in currently selected folder can be accessed. Also, most notifications only occur when a folder is selected.

This method represents IMAP SELECT and EXAMINE commands.

In builds for .NET 4.0 and higher, this method is available as an extension method. Add 'using Rebex.Legacy' (C#) or 'Import Rebex.Legacy' (VB.NET) to your code in order to use it.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also