X509ExtensionCollection.Item[] Property

Definition

Gets an X509Extension object from a X509ExtensionCollection object.

Overloads

Item[Int32]

Gets the X509Extension object at the specified index.

Item[String]

Gets the first X509Extension object whose value or friendly name is specified by an object identifier (OID).

Item[Int32]

Source:
X509ExtensionCollection.cs
Source:
X509ExtensionCollection.cs
Source:
X509ExtensionCollection.cs

Gets the X509Extension object at the specified index.

C#
public System.Security.Cryptography.X509Certificates.X509Extension this[int index] { get; }

Parameters

index
Int32

The location of the X509Extension object to retrieve.

Property Value

An X509Extension object.

Exceptions

index is less than zero.

index is equal to or greater than the length of the array.

Remarks

Use this property to get information about an X509Extension object when you know the location of the object in the X509ExtensionCollection object.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.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 1.3, 1.4, 1.6, 2.0, 2.1

Item[String]

Source:
X509ExtensionCollection.cs
Source:
X509ExtensionCollection.cs
Source:
X509ExtensionCollection.cs

Gets the first X509Extension object whose value or friendly name is specified by an object identifier (OID).

C#
public System.Security.Cryptography.X509Certificates.X509Extension? this[string oid] { get; }
C#
public System.Security.Cryptography.X509Certificates.X509Extension this[string oid] { get; }

Parameters

oid
String

The object identifier (OID) of the extension to retrieve.

Property Value

An X509Extension object.

Remarks

Use this property to get information about an X509Extension object when you know the object identifier (OID) of the extension in the X509ExtensionCollection object.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.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 1.3, 1.4, 1.6, 2.0, 2.1