| Visual Basic (Declaration) | |
|---|---|
Public Overloads Function BeginSet( _ ByVal first As ImapMessage, _ ByVal last As ImapMessage, _ ByVal operation As ImapFlagModifier, _ ByVal flags As ImapFlags, _ ByVal state As Object _ ) As IAsyncResult | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Mailbox Dim first As ImapMessage Dim last As ImapMessage Dim operation As ImapFlagModifier Dim flags As ImapFlags Dim state As Object Dim value As IAsyncResult value = instance.BeginSet(first, last, operation, flags, state) | |
| C# | |
|---|---|
public IAsyncResult BeginSet( ImapMessage first, ImapMessage last, ImapFlagModifier operation, ImapFlags flags, object state ) | |
| Managed Extensions for C++ | |
|---|---|
public: IAsyncResult* BeginSet( ImapMessage* first, ImapMessage* last, ImapFlagModifier operation, ImapFlags flags, Object* state ) | |
| C++/CLI | |
|---|---|
public: IAsyncResult^ BeginSet( ImapMessage^ first, ImapMessage^ last, ImapFlagModifier operation, ImapFlags flags, Object^ state ) | |
Parameters
- first
- An ImapMessage object representing the first message in the range to set.
- last
- An ImapMessage object representing the last message in the range to set.
- operation
- An ImapFlagModifier value specifying the operation to perform on the flags.
- flags
- An ImapFlags value specifying the flags to modify.
- state
- User state information.
Return Value
An IAsyncResult that represents the asynchronous operation, which could still be pending.| Exception | Description |
|---|---|
| Dart.PowerTCP.Mail.ProtocolException | Bad IMAP protocol response received from server. |
| System.Net.Sockets.SocketException | The requested address is not valid in its context. |
| System.InvalidOperationException | BeginXXX method used without providing an EndXXX event handler. |
| System.ArgumentOutOfRangeException | index was out of range |
| System.IndexOutOfRangeException | index was outside bounds of array |
| Dart.PowerTCP.Mail.InvalidParameterTypeException | Collection contains instances of wrong type of object |
The Mailbox.BeginSet method begins to asynchronously sets the values of one or more flags on the messages represented by the ImapMessage objects contained within the range specified by first and last. Upon completion of the operation the Imap.EndSet event is raised. This command results in an IMAP STORE command being issued to the server for each message. The command uses the UIDs of the messages in the collection to perform the set operation. The ImapMessage objects contained within messages must be within this mailbox.
This method is useful for bulk operations. If you would like to set a flag on a single message, use the properties of the ImapMessage object representing that message.
Target Platforms: Microsoft .NET Framework 2.0