| Visual Basic (Declaration) | |
|---|---|
Public Function BeginDelete( _ ByVal state As Object _ ) As IAsyncResult | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Mailbox Dim state As Object Dim value As IAsyncResult value = instance.BeginDelete(state) | |
| C# | |
|---|---|
public IAsyncResult BeginDelete( object state ) | |
| Managed Extensions for C++ | |
|---|---|
public: IAsyncResult* BeginDelete( Object* state ) | |
| C++/CLI | |
|---|---|
public: IAsyncResult^ BeginDelete( Object^ state ) | |
Parameters
- 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.NullReferenceException | Object reference not set to an instance of an object |
The Mailbox.BeginDelete method begins to asynchronously remove the specified mailbox from the server. Use of this method causes an IMAP DELETE command to be sent to the server to delete the mailbox and causes an implicit destruction of the object, with Mailbox.Dispose called upon successful completion of the operation, rendering the Mailbox unusable. The Mailbox is also removed from the MailboxCollection it is a member of.
The Imap.EndMailboxRemove event is raised upon completion of this method.
See also MailboxCollection.BeginRemove.
Target Platforms: Microsoft .NET Framework 2.0