���[���폜���s�̏ꍇ�̃G���[�ԍ���nMailException.ErrorCode�Ŏ擾�ł��܂��B
�w��̃��[���ԍ�(�ϐ���:no)��폜����B using(nMail.Pop3 pop = new nMail.Pop3("mail.example.com")) { try { pop.Connect(); pop.Authenticate("pop3_id", "password"); pop.Delete(no); MessageBox.Show(String.Format("���[���ԍ�:{0:d}��폜����", no)); } catch(nMail.nMailException nex) { MessageBox.Show(String.Format("�G���[ �ԍ�:{0:d} ���b�Z�[�W:{1:s}", nex.ErrorCode, nex.Message)); } catch(Exception ex) { MessageBox.Show(String.Format("�G���[ ���b�Z�[�W:{0:s}", ex.Message)); } }
' VB.NET 2005 �ȍ~�̏ꍇ�AC# �Ɠ��l�� using ���g�p�ł��܂��B Dim pop As nMail.Pop3 = New nMail.Pop3("mail.example.com") Try pop.Connect() pop.Authenticate("pop3_id", "password") pop.Delete(no) MessageBox.Show(String.Format("���[���ԍ�:{0:d}��폜����", no)) Catch nex As nMail.nMailException MessageBox.Show(String.Format("�G���[ �ԍ�:{0:d} ���b�Z�[�W:{1:s}", nex.ErrorCode, nex.Message)) Catch ex As Exception MessageBox.Show(String.Format("�G���[ ���b�Z�[�W:{0:s}", ex.Message)) Finally pop.Dispose() End Try
public Delete ( int no ) : void | ||
no | int | ���[���ԍ� |
return | void |