| Visual Basic (Declaration) | |
|---|---|
Public Overridable Function BeginClear( _ ByVal state As Object _ ) As IAsyncResult | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As ImapMessageCollection Dim state As Object Dim value As IAsyncResult value = instance.BeginClear(state) | |
| C# | |
|---|---|
public virtual IAsyncResult BeginClear( object state ) | |
| Managed Extensions for C++ | |
|---|---|
public: virtual IAsyncResult* BeginClear( Object* state ) | |
| C++/CLI | |
|---|---|
public: virtual IAsyncResult^ BeginClear( Object^ state ) | |
Parameters
- state
Return Value
An IAsyncResult that represents the asynchronous operation, which could still be pending.| Exception | Description |
|---|---|
| System.InvalidOperationException | BeginXXX method used without providing an EndXXX event handler. |
| Dart.PowerTCP.Mail.ProtocolException | Bad IMAP protocol response received from server. |
| System.Net.Sockets.SocketException | The requested address is not valid in its context. |
This method begins to asynchronously clear all messages in the currently selected mailbox (the mailbox represented by Imap.CurrentMailbox). The messages are cleared by first setting their MessageBase.Delete flag to true then sending an "EXPUNGE" command by calling Mailbox.Purge. When this operation is complete, the Imap.EndClear event will be raised.
Target Platforms: Microsoft .NET Framework 2.0