PowerTCP Mail for .NET
BeginDelete Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > Mailbox Class : BeginDelete Method




state
User state information.
Begins to asynchronously remove the specified mailbox from the server.

Syntax

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.

Exceptions

ExceptionDescription
Dart.PowerTCP.Mail.ProtocolExceptionBad IMAP protocol response received from server.
System.Net.Sockets.SocketExceptionThe requested address is not valid in its context.
System.InvalidOperationExceptionBeginXXX method used without providing an EndXXX event handler.
System.NullReferenceExceptionObject reference not set to an instance of an object

Remarks

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.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.