| Visual Basic (Declaration) | |
|---|---|
Public ReadOnly Property Mailboxes As Mailbox() | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As MailboxEventArgs Dim value() As Mailbox value = instance.Mailboxes | |
| C# | |
|---|---|
public Mailbox[] Mailboxes {get;} | |
| Managed Extensions for C++ | |
|---|---|
public: __property Mailbox*[]* get_Mailboxes(); | |
| C++/CLI | |
|---|---|
public: property array<Mailbox^>^ Mailboxes { array<Mailbox^>^ get(); } | |
Property Value
Returns an array of Mailbox objects.The following example demonstrates performing an asynchronous listing.
| Visual Basic | Copy Code |
|---|---|
Private Sub AsynchronousListTest() ' Set Autolist to false. We will explicitly call for a listing. Imap1.AutoList = False ' Login to the server. Imap1.Login(Server, User, Pass) ' Begin an asynchronous listing. Imap1.BeginList(Nothing) End Sub Private Sub Imap1_EndList(ByVal sender As Object, ByVal e As Dart.PowerTCP.Mail.MailboxEventArgs) Handles Imap1.EndList If e.Exception Is Nothing Then Debug.WriteLine("The following mailboxes were reported.") Dim Box As Mailbox For Each Box In E.Mailboxes Debug.WriteLine(Box.Name) End If End If End Sub | |
| C# | Copy Code |
|---|---|
private void AsynchronousListTest() { // Set Autolist to false. We will explicitly call for a listing. imap1.AutoList = false; // Login to the server. imap1.Login(Server, User, Pass); // Begin an asynchronous listing. imap1.BeginList(null); } private void imap1_EndList(object sender, Dart.PowerTCP.Mail.MailboxEventArgs e) { if(e.Exception == null) { Debug.WriteLine("The following mailboxes were reported."); foreach(Mailbox box in e.Mailboxes) Debug.WriteLine(box.Name); } } | |
If it is expected that multiple mailboxes are effected, iterate through this collection to access each mailbox. If it is expected that a single mailbox is effected, access MailboxEventArgs.Mailboxes[0] or simply access the MailboxEventArgs.Mailbox property, which contains the first mailbox effected.
Target Platforms: Microsoft .NET Framework 2.0
Copy Code