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 值,该值表示从零开始插入收件人的位置。

如果此方法失败,则会引发异常。

例外

recipientnull

适用于

另请参阅