X509Certificate2Collection.Insert(Int32, X509Certificate2) Metod

Definition

Infogar ett objekt i objektet X509Certificate2Collection i det angivna indexet.

public:
 void Insert(int index, System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate);
public void Insert(int index, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
override this.Insert : int * System.Security.Cryptography.X509Certificates.X509Certificate2 -> unit
Public Sub Insert (index As Integer, certificate As X509Certificate2)

Parametrar

index
Int32

Det nollbaserade index där du ska infoga certificate.

certificate
X509Certificate2

Objektet X509Certificate2 som ska infogas.

Undantag

index är mindre än noll.

-eller-

index är större än egenskapen Count .

Samlingen är skrivskyddad.

-eller-

Samlingen har en fast storlek.

certificate är null.

Kommentarer

Om egenskapen Count redan är lika med kapaciteten i listan fördubblas kapaciteten genom att den interna matrisen omplaceras automatiskt innan det nya elementet infogas.

Om index är lika med Countcertificate läggs till i slutet av samlingen.

Gäller för