| Visual Basic (Declaration) | |
|---|---|
Public Function BeginRefresh( _ 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.BeginRefresh(state) | |
| C# | |
|---|---|
public IAsyncResult BeginRefresh( object state ) | |
| Managed Extensions for C++ | |
|---|---|
public: IAsyncResult* BeginRefresh( Object* state ) | |
| C++/CLI | |
|---|---|
public: IAsyncResult^ BeginRefresh( 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. |
Any time a method is called to add/delete/modify a mailbox, the command is sent to the server to update the server mailbox and the appropriate modifications are made to the local Mailbox object representing the server mailbox. The Mailbox.BeginRefresh method updates all the Mailbox properties to reflect the server version. Upon completion of this operation, the Imap.EndRefresh event is raised. This method uses the IMAP EXAMINE or REFRESH commands to retrieve the current settings of the mailbox, so calling this method is equivalent to setting the mailbox equal to the current mailbox (i.e. this Mailbox object will be the Imap.CurrentMailbox property after calling this method). In addition, this will get information about any new mailbox updates that may have occurred due to another user being logged into the account.
Target Platforms: Microsoft .NET Framework 2.0