X509Certificate2Collection Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Represents a collection of X509Certificate2 objects. This class cannot be inherited.

Inheritance Hierarchy

System. . :: . .Object
  System.Collections. . :: . .ArrayList
    System.Security.Cryptography.X509Certificates..::..X509Certificate2Collection

Namespace:  System.Security.Cryptography.X509Certificates
Assembly:  System.Security (in System.Security.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public Class X509Certificate2Collection _
    Inherits ArrayList
[SerializableAttribute]
public class X509Certificate2Collection : ArrayList
[SerializableAttribute]
public ref class X509Certificate2Collection : public ArrayList
[<SerializableAttribute>]
type X509Certificate2Collection =  
    class
        inherit ArrayList
    end
public class X509Certificate2Collection extends ArrayList

The X509Certificate2Collection type exposes the following members.

Constructors

  Name Description
Public method X509Certificate2Collection() () () () Initializes a new instance of the X509Certificate2Collection class without any X509Certificate2 information.
Public method X509Certificate2Collection(array<X509Certificate2> [] () [] []) Initializes a new instance of the X509Certificate2Collection class using an array of X509Certificate2 objects.
Public method X509Certificate2Collection(X509Certificate2Collection) Initializes a new instance of the X509Certificate2Collection class using the specified certificate collection.

Top

Properties

  Name Description
Public property Capacity Gets or sets the number of elements that the ArrayList can contain. (Inherited from ArrayList.)
Public property Count Gets the number of elements actually contained in the ArrayList. (Inherited from ArrayList.)
Public property IsFixedSize Gets a value indicating whether the ArrayList has a fixed size. (Inherited from ArrayList.)
Public property IsReadOnly Gets a value indicating whether the ArrayList is read-only. (Inherited from ArrayList.)
Public property IsSynchronized Gets a value indicating whether access to the ArrayList is synchronized (thread safe). (Inherited from ArrayList.)
Public property Item Gets or sets the element at the specified index.
Public property SyncRoot Gets an object that can be used to synchronize access to the ArrayList. (Inherited from ArrayList.)

Top

Methods

  Name Description
Public method Add(Object) Adds an object to the end of the ArrayList. (Inherited from ArrayList.)
Public method Add(X509Certificate2) Adds an object to the end of the X509Certificate2Collection.
Public method AddRange(array<X509Certificate2> [] () [] []) Adds multiple X509Certificate2 objects in an array to the X509Certificate2Collection object.
Public method AddRange(X509Certificate2Collection) Adds multiple X509Certificate2 objects in an X509Certificate2Collection object to another X509Certificate2Collection object.
Public method BinarySearch Searches the entire sorted ArrayList for an element using the specified comparer and returns the zero-based index of the element. (Inherited from ArrayList.)
Public method Clear Removes all elements from the ArrayList. (Inherited from ArrayList.)
Public method Clone Creates a shallow copy of the ArrayList. (Inherited from ArrayList.)
Public method Contains(Object) Determines whether an element is in the ArrayList. (Inherited from ArrayList.)
Public method Contains(X509Certificate2) Determines whether the X509Certificate2Collection object contains a specific certificate.
Public method CopyTo(Array) Copies the entire ArrayList to a compatible one-dimensional Array, starting at the beginning of the target array. (Inherited from ArrayList.)
Public method CopyTo(Array, Int32) Copies the entire ArrayList to a compatible one-dimensional Array, starting at the specified index of the target array. (Inherited from ArrayList.)
Public method CopyTo(array<X509Certificate2> [] () [] [], Int32) Copies the X509Certificate values in the current X509Certificate2Collection to a one-dimensional array at the specified index.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Find Searches an X509Certificate2Collection object using the search criteria specified by the X509FindType enumeration and the findValue object.
Public method GetEnumerator Returns an enumerator for the entire ArrayList. (Inherited from ArrayList.)
Public method GetHashCode Builds a hash value based on all values contained in the current collection. (Overrides Object. . :: . .GetHashCode() () () ().)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method IndexOf(Object) Searches for the specified Object and returns the zero-based index of the first occurrence within the entire ArrayList. (Inherited from ArrayList.)
Public method IndexOf(X509Certificate2) Returns the index of the specified X509Certificate in the current X509Certificate2Collection.
Public method IndexOf(Object, Int32) Searches for the specified Object and returns the zero-based index of the first occurrence within the range of elements in the ArrayList that extends from the specified index to the last element. (Inherited from ArrayList.)
Public method IndexOf(Object, Int32, Int32) Searches for the specified Object and returns the zero-based index of the first occurrence within the range of elements in the ArrayList that starts at the specified index and contains the specified number of elements. (Inherited from ArrayList.)
Public method Insert(Int32, Object) Inserts an element into the ArrayList at the specified index. (Inherited from ArrayList.)
Public method Insert(Int32, X509Certificate2) Inserts an object into the X509Certificate2Collection object at the specified index.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Remove(Object) Removes the first occurrence of a specific object from the ArrayList. (Inherited from ArrayList.)
Public method Remove(X509Certificate2) Removes the first occurrence of a certificate from the X509Certificate2Collection object.
Public method RemoveAt Removes the element at the specified index of the ArrayList. (Inherited from ArrayList.)
Public method ToArray() () () () Copies the elements of the ArrayList to a new Object array. (Inherited from ArrayList.)
Public method ToArray(Type) Copies the elements of the ArrayList to a new array of the specified element type. (Inherited from ArrayList.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

When an X509Certificate2 store is opened, the result is represented by an X509Certificate2Collection object. If you are familiar with the unmanaged Cryptographic API constructs, you can think of an X509Certificate2Collection as a memory store of X509Certificate2 objects.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Security.Cryptography.X509Certificates Namespace