Compartilhar via


X509Certificate.Import Method (array<Byte[])

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Populates the X509Certificate object with data from a byte array.

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

Syntax

'Declaration
<SecuritySafeCriticalAttribute> _
<ComVisibleAttribute(False)> _
Public Overridable Sub Import ( _
    rawData As Byte() _
)
[SecuritySafeCriticalAttribute]
[ComVisibleAttribute(false)]
public virtual void Import(
    byte[] rawData
)

Parameters

  • rawData
    Type: array<System.Byte[]
    A byte array containing data from an X.509 certificate.

Exceptions

Exception Condition
ArgumentException

The rawData parameter is nulla null reference (Nothing in Visual Basic).

-or-

The length of the rawData parameter is 0.

Remarks

This method can be used to take the raw byte array of an X.509 certificate and populate the X509Certificate object with its associated values.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.