| Visual Basic (Declaration) | |
|---|---|
Public Function Delete() As ImapResponse | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Mailbox Dim value As ImapResponse value = instance.Delete() | |
| C# | |
|---|---|
public ImapResponse Delete() | |
| Managed Extensions for C++ | |
|---|---|
public: ImapResponse* Delete(); | |
| C++/CLI | |
|---|---|
public: ImapResponse^ Delete(); | |
Return Value
An ImapResponse object encapsulating the response from the server.| 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.NullReferenceException | Object reference not set to an instance of an object |
The Mailbox.Delete method removes 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.
See also MailboxCollection.Remove.
Target Platforms: Microsoft .NET Framework 2.0