CmsRecipientCollection.Add(CmsRecipient) Metod

Definition

Metoden Add(CmsRecipient) lägger till en mottagare i CmsRecipientCollection samlingen.

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

Parametrar

recipient
CmsRecipient

Ett CmsRecipient objekt som representerar mottagaren som ska läggas till i CmsRecipientCollection samlingen.

Returer

Om metoden lyckas returnerar metoden ett Int32 värde som representerar den nollbaserade position där mottagaren ska infogas.

Om metoden misslyckas utlöser den ett undantag.

Undantag

recipient är null.

Gäller för

Se även