| Visual Basic (Declaration) | |
|---|---|
Public Overloads Function BeginSet( _ ByVal messages As ICollection, _ ByVal operation As ImapFlagModifier, _ ByVal flags As ImapFlags, _ ByVal state As Object _ ) As IAsyncResult | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Mailbox Dim messages As ICollection Dim operation As ImapFlagModifier Dim flags As ImapFlags Dim state As Object Dim value As IAsyncResult value = instance.BeginSet(messages, operation, flags, state) | |
| C# | |
|---|---|
public IAsyncResult BeginSet( ICollection messages, ImapFlagModifier operation, ImapFlags flags, object state ) | |
| Managed Extensions for C++ | |
|---|---|
public: IAsyncResult* BeginSet( ICollection* messages, ImapFlagModifier operation, ImapFlags flags, Object* state ) | |
| C++/CLI | |
|---|---|
public: IAsyncResult^ BeginSet( ICollection^ messages, ImapFlagModifier operation, ImapFlags flags, Object^ state ) | |
Parameters
- messages
- The collection containing ImapMessage objects on which to modify the flags.
- 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 set the values of one or more flags on the messages represented by the ImapMessage objects contained within messages. 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