net9.0
namespace System.Security.Cryptography.X509Certificates
{
    public class X509Certificate2 : X509Certificate
    {
        [Obsolete("X509Certificate2.PrivateKey is obsolete. Use the appropriate method to get the private key, such as GetRSAPrivateKey, or use the CopyWithPrivateKey method to create a new instance with a private key.", DiagnosticId = "SYSLIB0028", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
        public AsymmetricAlgorithm? PrivateKey { get; set; }
    }
}
NetFx Compat Lab
14.1 %
Reference this API
12.6 %
Get property
6.6 %
Set property
nuget.org
0.6 %
Reference this API
0.6 %
Get property
0.2 %
Set property
Upgrade Planner
0.7 %
Reference this API
0.7 %
Get property
0.1 %
Set property
Design Reviews
.NET 5.06.07.08.09.0
.NET Core 2.02.12.23.03.1
.NET Framework 2.03.03.54.04.54.5.14.5.24.64.6.14.6.24.74.7.14.7.24.84.8.1
.NET Standard 2.02.1
Information specific to net9.0
Assembly

System.Security.Cryptography , Version=9.0.0.0, PublicKeyToken=b03f5f7f11d50a3a

Referencing

The API is automatically referenced.

Obsolete SYSLIB0028: X509Certificate2.PrivateKey is obsolete. Use the appropriate method to get the private key, such as GetRSAPrivateKey, or use the CopyWithPrivateKey method to create a new instance with a private key.
Platform Restrictions

The property getter is supported on all platforms.

The property setter is supported on all platforms.

  • Built-in API
  • Package-provided API

12/27/2024
An error has occurred. This application may no longer respond until reloaded. Reload 🗙