---
title: "What is Hight and Low surrogate character in .NET?"  
description: "What is Hight and Low surrogate character in .NET?"  
author: "ICSM Computer"  
published: 2025-06-03  
updated: 2025-06-03  
canonical: https://www.mindstick.com/interview/34200/what-is-hight-and-low-surrogate-character-in-dot-net  
category: "c#"  
tags: ["c#"]  
reading_time: 3 minutes  

---

# What is Hight and Low surrogate character in .NET?

In .NET (and Unicode in general), **high** and **low surrogate characters** are used to represent **Unicode code points** that cannot be represented in a single 16-bit `char` (i.e., characters beyond the Basic Multilingual Plane, BMP — those with code points above `U+FFFF`).

### Surrogate Pairs: What They Are

.NET uses **UTF-16** encoding for strings. UTF-16 represents:

- Code points from `U+0000` to `U+FFFF` (BMP) in a **single** `char` **(16-bit)**.
- Code points from `U+10000` to `U+10FFFF` using a **pair of** `char` **values** — one **high surrogate** and one **low surrogate**.

This pair is called a **surrogate pair**.

### High Surrogate

- Unicode range: `U+D800` to `U+DBFF`
- Decimal range: `55296` to `56319`
- Always appears **first** in a surrogate pair

### Low Surrogate

- Unicode range: `U+DC00` to `U+DFFF`
- Decimal range: `56320` to `57343`
- Always appears **second** in a surrogate pair

### Example

Consider the emoji **😁** (Unicode code point `U+1F601`):

In UTF-16, this is encoded as:

- High Surrogate: `\uD83D`
- Low Surrogate: `\uDE01`

```cs
string emoji = "😁";
char highSurrogate = emoji[0]; // '\uD83D'
char lowSurrogate  = emoji[1]; // '\uDE01'
```

### .NET API Methods Related to Surrogates

You can use these static methods from the `Char` class:

```cs
bool isHigh = Char.IsHighSurrogate(char c);
bool isLow = Char.IsLowSurrogate(char c);
bool isSurrogatePair(char high, char low);
```

Example:

```cs
char hs = '\uD83D';
char ls = '\uDE01';

bool valid = Char.IsSurrogatePair(hs, ls); // true
```

### Summary Table

| Type | Unicode Range | Decimal Range | Notes |
| --- | --- | --- | --- |
| High Surrogate | U+D800–U+DBFF | 55296–56319 | First char in a pair |
| Low Surrogate | U+DC00–U+DFFF | 56320–57343 | Second char in a pair |

## Answers

### Answer by ICSM Computer

In .NET (and Unicode in general), **high** and **low surrogate characters** are used to represent **Unicode code points** that cannot be represented in a single 16-bit `char` (i.e., characters beyond the Basic Multilingual Plane, BMP — those with code points above `U+FFFF`).

### Surrogate Pairs: What They Are

.NET uses **UTF-16** encoding for strings. UTF-16 represents:

- Code points from `U+0000` to `U+FFFF` (BMP) in a **single** `char` **(16-bit)**.
- Code points from `U+10000` to `U+10FFFF` using a **pair of** `char` **values** — one **high surrogate** and one **low surrogate**.

This pair is called a **surrogate pair**.

### High Surrogate

- Unicode range: `U+D800` to `U+DBFF`
- Decimal range: `55296` to `56319`
- Always appears **first** in a surrogate pair

### Low Surrogate

- Unicode range: `U+DC00` to `U+DFFF`
- Decimal range: `56320` to `57343`
- Always appears **second** in a surrogate pair

### Example

Consider the emoji **😁** (Unicode code point `U+1F601`):

In UTF-16, this is encoded as:

- High Surrogate: `\uD83D`
- Low Surrogate: `\uDE01`

```cs
string emoji = "😁";
char highSurrogate = emoji[0]; // '\uD83D'
char lowSurrogate  = emoji[1]; // '\uDE01'
```

### .NET API Methods Related to Surrogates

You can use these static methods from the `Char` class:

```cs
bool isHigh = Char.IsHighSurrogate(char c);
bool isLow = Char.IsLowSurrogate(char c);
bool isSurrogatePair(char high, char low);
```

Example:

```cs
char hs = '\uD83D';
char ls = '\uDE01';

bool valid = Char.IsSurrogatePair(hs, ls); // true
```

### Summary Table

| Type | Unicode Range | Decimal Range | Notes |
| --- | --- | --- | --- |
| High Surrogate | U+D800–U+DBFF | 55296–56319 | First char in a pair |
| Low Surrogate | U+DC00–U+DFFF | 56320–57343 | Second char in a pair |


---

Original Source: https://www.mindstick.com/interview/34200/what-is-hight-and-low-surrogate-character-in-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
