CmsRecipientCollection.Add(CmsRecipient) Méthode

Définition

La méthode Add(CmsRecipient) ajoute un destinataire à la collection CmsRecipientCollection.The Add(CmsRecipient) method adds a recipient to the CmsRecipientCollection collection.

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

Paramètres

recipient
CmsRecipient

Objet CmsRecipient qui représente le destinataire à ajouter à la collection CmsRecipientCollection.A CmsRecipient object that represents the recipient to add to the CmsRecipientCollection collection.

Retours

Int32

Si la méthode réussit, elle retourne une valeur Int32 qui représente la position de base zéro où le destinataire sera inséré.If the method succeeds, the method returns an Int32 value that represents the zero-based position where the recipient is to be inserted.

Si la méthode échoue, une exception est levée.If the method fails, it throws an exception.

Exceptions

recipient a la valeur null.recipient is null.

S’applique à

Voir aussi