共用方式為


CmsRecipientCollection.Add(CmsRecipient) 方法

定義

Add(CmsRecipient) 方法會將收件者加入至 CmsRecipientCollection 集合。

public:
 int Add(System::Security::Cryptography::Pkcs::CmsRecipient ^ recipient);
public int Add (System.Security.Cryptography.Pkcs.CmsRecipient recipient);
member this.Add : System.Security.Cryptography.Pkcs.CmsRecipient -> int
Public Function Add (recipient As CmsRecipient) As Integer

參數

recipient
CmsRecipient

CmsRecipient 物件,表示要加入至 CmsRecipientCollection 集合的收件者。

傳回

Int32

如果方法成功,方法會傳回 Int32 值,表示要插入收件者之以零起始的位置。

如果方法失敗,就會擲回例外狀況。

例外狀況

recipientnull

適用於

另請參閱