X509Certificate2Collection.AddRange 方法

定义

将多个 X509Certificate2 对象添加到 X509Certificate2Collection 对象。Adds multiple X509Certificate2 objects to an X509Certificate2Collection object.

重载

AddRange(X509Certificate2[])

将数组中的多个 X509Certificate2 对象添加到 X509Certificate2Collection 对象。Adds multiple X509Certificate2 objects in an array to the X509Certificate2Collection object.

AddRange(X509Certificate2Collection)

X509Certificate2 对象中的多个 X509Certificate2Collection 对象添加到另一个 X509Certificate2Collection 对象。Adds multiple X509Certificate2 objects in an X509Certificate2Collection object to another X509Certificate2Collection object.

AddRange(X509Certificate2[])

将数组中的多个 X509Certificate2 对象添加到 X509Certificate2Collection 对象。Adds multiple X509Certificate2 objects in an array to the X509Certificate2Collection object.

public:
 void AddRange(cli::array <System::Security::Cryptography::X509Certificates::X509Certificate2 ^> ^ certificates);
public void AddRange (System.Security.Cryptography.X509Certificates.X509Certificate2[] certificates);
override this.AddRange : System.Security.Cryptography.X509Certificates.X509Certificate2[] -> unit
Public Sub AddRange (certificates As X509Certificate2())

参数

certificates
X509Certificate2[]

一个 X509Certificate2 对象数组。An array of X509Certificate2 objects.

例外

certificatesnullcertificates is null.

注解

如果有 X509Certificate2 要添加到对象的对象的数组,请使用此方法 X509Certificate2CollectionUse this method if you have an array of X509Certificate2 objects to add to an X509Certificate2Collection object. AddRangeRemoveRange 方法以事务方式处理请求,因此,如果单个添加或删除失败,整个操作将中止。The AddRange and RemoveRange methods process requests transactionally, so that if a single add or remove fails, the entire operation is aborted.

适用于

AddRange(X509Certificate2Collection)

X509Certificate2 对象中的多个 X509Certificate2Collection 对象添加到另一个 X509Certificate2Collection 对象。Adds multiple X509Certificate2 objects in an X509Certificate2Collection object to another X509Certificate2Collection object.

public:
 void AddRange(System::Security::Cryptography::X509Certificates::X509Certificate2Collection ^ certificates);
public void AddRange (System.Security.Cryptography.X509Certificates.X509Certificate2Collection certificates);
override this.AddRange : System.Security.Cryptography.X509Certificates.X509Certificate2Collection -> unit
Public Sub AddRange (certificates As X509Certificate2Collection)

参数

例外

certificatesnullcertificates is null.

注解

如果 X509Certificate2Collection 要添加到另一个对象的对象中有证书,请使用此方法 X509Certificate2CollectionUse this method if you have certificates in an X509Certificate2Collection object that you want to add to another X509Certificate2Collection object. AddRangeRemoveRange 方法以事务方式处理请求,因此,如果单个添加或删除失败,整个操作将中止。The AddRange and RemoveRange methods process requests transactionally, so that if a single add or remove fails, the entire operation is aborted.

适用于