# Class KeyCertificatePair (2.66.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.66.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.KeyCertificatePair)
- [2.63.0](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/2.63.0/Grpc.Core.KeyCertificatePair)
- [2.48.0](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/2.48.0/Grpc.Core.KeyCertificatePair)

    public sealed class KeyCertificatePair

Key certificate pair (in PEM encoding).

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> KeyCertificatePair

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Grpc.Core](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core)

## Assembly

Grpc.Core.Api.dll

## Constructors

### KeyCertificatePair(string, string)

    public KeyCertificatePair(string certificateChain, string privateKey)

Creates a new certificate chain - private key pair.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `certificateChain` | `https://learn.microsoft.com/dotnet/api/system.string` PEM encoded certificate chain. |
| `privateKey` | `https://learn.microsoft.com/dotnet/api/system.string` PEM encoded private key. |

## Properties

### CertificateChain

    public string CertificateChain { get; }

PEM encoded certificate chain.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### PrivateKey

    public string PrivateKey { get; }

PEM encoded private key.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |