ApplicationTrustCollection.AddRange Method

Definition

Copies a range of ApplicationTrust objects to the end of the collection.

Overloads

AddRange(ApplicationTrust[])

Copies the elements of the specified ApplicationTrust array to the end of the collection.

AddRange(ApplicationTrustCollection)

Copies the elements of the specified ApplicationTrustCollection to the end of the collection.

AddRange(ApplicationTrust[])

Source:
ApplicationTrustCollection.cs
Source:
ApplicationTrustCollection.cs
Source:
ApplicationTrustCollection.cs
Source:
ApplicationTrustCollection.cs
Source:
ApplicationTrustCollection.cs

Copies the elements of the specified ApplicationTrust array to the end of the collection.

C#
public void AddRange(System.Security.Policy.ApplicationTrust[] trusts);
C#
[System.Security.SecurityCritical]
public void AddRange(System.Security.Policy.ApplicationTrust[] trusts);

Parameters

trusts
ApplicationTrust[]

An array of type ApplicationTrust containing the objects to add to the collection.

Attributes

Exceptions

trusts is null.

The ApplicationIdentity property of an ApplicationTrust specified in trust is null.

Remarks

The ApplicationTrust objects contained in the trusts array are appended to the end of the collection.

To remove a range of application trusts that you previously added, use the RemoveRange method.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

AddRange(ApplicationTrustCollection)

Source:
ApplicationTrustCollection.cs
Source:
ApplicationTrustCollection.cs
Source:
ApplicationTrustCollection.cs
Source:
ApplicationTrustCollection.cs
Source:
ApplicationTrustCollection.cs

Copies the elements of the specified ApplicationTrustCollection to the end of the collection.

C#
public void AddRange(System.Security.Policy.ApplicationTrustCollection trusts);
C#
[System.Security.SecurityCritical]
public void AddRange(System.Security.Policy.ApplicationTrustCollection trusts);

Parameters

trusts
ApplicationTrustCollection

A ApplicationTrustCollection containing the objects to add to the collection.

Attributes

Exceptions

trusts is null.

The ApplicationIdentity property of an ApplicationTrust specified in trust is null.

Remarks

The ApplicationTrust objects contained in trusts are appended to the end of the collection.

You can use the AddRange method to quickly add another collection of application trust objects to the collection instead of manually adding each application trust to the collection using the Add method.

To remove a range of application trusts that you previously added, use the RemoveRange method.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10