Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
166 changes: 42 additions & 124 deletions xml/System/Char.xml
Original file line number Diff line number Diff line change
Expand Up @@ -490,14 +490,12 @@ When a managed <xref:System.Char> type, which is represented as a Unicode UTF-16

Ordinarily, UTF-16 encoding represents a single Unicode character as a 16-bit code unit. However, it also supports surrogate pairs, which allow a single abstract character to be represented as two 16-bit code units. These two <xref:System.Char> objects must have code units that range from U+D800 to U+DBFF for the first (high) surrogate and from U+DC00 to U+DFFF for the second (low) surrogate. Surrogate pairs are supported only by UTF-16 encoding. This method allows a character represented by a UTF-16 surrogate pair to be converted to a character using UTF-32 encoding.



## Examples
The following code example demonstrates the <xref:System.Char.ConvertToUtf32%2A> and <xref:System.Char.ConvertFromUtf32%2A> methods.

[!code-cpp[char.cvtutf32#1](~/samples/snippets/cpp/VS_Snippets_CLR/char.cvtutf32/CPP/utf.cpp#1)]
[!code-csharp[char.cvtutf32#1](~/samples/snippets/csharp/VS_Snippets_CLR/char.cvtutf32/CS/utf.cs#1)]
[!code-vb[char.cvtutf32#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/char.cvtutf32/VB/utf.vb#1)]
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/char.cvtutf32/CPP/utf.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/char.cvtutf32/CS/utf.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/char.cvtutf32/VB/utf.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -555,15 +553,6 @@ When a managed <xref:System.Char> type, which is represented as a Unicode UTF-16
## Remarks
Use this method to convert a character or surrogate pair into a 21-bit Unicode code point. To convert UTF-16 data into UTF-32 data, use the <xref:System.Text.UTF32Encoding?displayProperty=nameWithType> class.



## Examples
The following code example demonstrates the <xref:System.Char.ConvertToUtf32%2A> and <xref:System.Char.ConvertFromUtf32%2A> methods.

[!code-cpp[char.cvtutf32#1](~/samples/snippets/cpp/VS_Snippets_CLR/char.cvtutf32/CPP/utf.cpp#1)]
[!code-csharp[char.cvtutf32#1](~/samples/snippets/csharp/VS_Snippets_CLR/char.cvtutf32/CS/utf.cs#1)]
[!code-vb[char.cvtutf32#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/char.cvtutf32/VB/utf.vb#1)]

]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
Expand Down Expand Up @@ -1165,9 +1154,9 @@ When a managed <xref:System.Char> type, which is represented as a Unicode UTF-16
## Examples
The following example lists the Unicode code point of each of the control characters.

[!code-cpp[System.Char.IsControl#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.IsControl/CPP/iscontrol1.cpp#1)]
[!code-csharp[System.Char.IsControl#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.IsControl/CS/IsControl1.cs#1)]
[!code-vb[System.Char.IsControl#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.IsControl/VB/IsControl1.vb#1)]
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.IsControl/CPP/iscontrol1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.IsControl/CS/IsControl1.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.IsControl/VB/IsControl1.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down Expand Up @@ -1747,8 +1736,15 @@ When a managed <xref:System.Char> type, which is represented as a Unicode UTF-16

## Remarks
Valid letters and decimal digits are members of the following categories in <xref:System.Globalization.UnicodeCategory>: `UppercaseLetter`, `LowercaseLetter`, `TitlecaseLetter`, `ModifierLetter`, `OtherLetter`, or `DecimalDigitNumber`.

]]></format>

## Examples
The following code example demonstrates <xref:System.Char.IsLetterOrDigit%2A>.

:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.IsLetterOrDigit/CPP/isletterordigit.cpp" id="Snippet6":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.IsLetterOrDigit/CS/isletterordigit.cs" interactive="try-dotnet" id="Snippet6":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.IsLetterOrDigit/VB/isletterordigit.vb" id="Snippet6":::

]]></format>
</remarks>
</Docs>
</MemberGroup>
Expand Down Expand Up @@ -1805,15 +1801,6 @@ When a managed <xref:System.Char> type, which is represented as a Unicode UTF-16
## Remarks
Valid letters and decimal digits are members of the following categories in <xref:System.Globalization.UnicodeCategory>: `UppercaseLetter`, `LowercaseLetter`, `TitlecaseLetter`, `ModifierLetter`, `OtherLetter`, or `DecimalDigitNumber`.



## Examples
The following code example demonstrates <xref:System.Char.IsLetterOrDigit%2A>.

[!code-cpp[System.Char.IsLetterOrDigit#6](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.IsLetterOrDigit/CPP/isletterordigit.cpp#6)]
[!code-csharp[System.Char.IsLetterOrDigit#6](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.IsLetterOrDigit/CS/isletterordigit.cs#6)]
[!code-vb[System.Char.IsLetterOrDigit#6](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.IsLetterOrDigit/VB/isletterordigit.vb#6)]

]]></format>
</remarks>
<altmember cref="T:System.Boolean" />
Expand Down Expand Up @@ -1876,15 +1863,6 @@ When a managed <xref:System.Char> type, which is represented as a Unicode UTF-16

Valid letters and decimal digits are members of the following categories in <xref:System.Globalization.UnicodeCategory>: `UppercaseLetter`, `LowercaseLetter`, `TitlecaseLetter`, `ModifierLetter`, `OtherLetter`, or `DecimalDigitNumber`.



## Examples
The following code example demonstrates <xref:System.Char.IsLetterOrDigit%2A>.

[!code-cpp[System.Char.IsLetterOrDigit#6](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.IsLetterOrDigit/CPP/isletterordigit.cpp#6)]
[!code-csharp[System.Char.IsLetterOrDigit#6](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.IsLetterOrDigit/CS/isletterordigit.cs#6)]
[!code-vb[System.Char.IsLetterOrDigit#6](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.IsLetterOrDigit/VB/isletterordigit.vb#6)]

]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
Expand Down Expand Up @@ -2404,6 +2382,13 @@ When a managed <xref:System.Char> type, which is represented as a Unicode UTF-16
|U+05C6|U+17D4 to U+17D6|U+3001 to U+3003|U+FF5F to U+FF65|
|U+05F3 and U+05F4|U+17D8 to U+17DA|U+3008 to U+3011||

## Examples
The following code example demonstrates <xref:System.Char.IsPunctuation%2A>.

:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.IsPunctuation/CPP/ispunctuation.cpp" id="Snippet9":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.IsPunctuation/CS/ispunctuation.cs" interactive="try-dotnet" id="Snippet9":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.IsPunctuation/VB/ispunctuation.vb" id="Snippet9":::

]]></format>
</remarks>
</Docs>
Expand Down Expand Up @@ -2483,15 +2468,6 @@ When a managed <xref:System.Char> type, which is represented as a Unicode UTF-16
|U+05C6|U+17D4 to U+17D6|U+3001 to U+3003|U+FF5F to U+FF65|
|U+05F3 and U+05F4|U+17D8 to U+17DA|U+3008 to U+3011||



## Examples
The following code example demonstrates <xref:System.Char.IsPunctuation%2A>.

[!code-cpp[System.Char.IsPunctuation#9](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.IsPunctuation/CPP/ispunctuation.cpp#9)]
[!code-csharp[System.Char.IsPunctuation#9](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.IsPunctuation/CS/ispunctuation.cs#9)]
[!code-vb[System.Char.IsPunctuation#9](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.IsPunctuation/VB/ispunctuation.vb#9)]

]]></format>
</remarks>
<altmember cref="T:System.Boolean" />
Expand Down Expand Up @@ -2581,15 +2557,6 @@ When a managed <xref:System.Char> type, which is represented as a Unicode UTF-16
|U+05C6|U+17D4 to U+17D6|U+3001 to U+3003|U+FF5F to U+FF65|
|U+05F3 and U+05F4|U+17D8 to U+17DA|U+3008 to U+3011||



## Examples
The following code example demonstrates <xref:System.Char.IsPunctuation%2A>.

[!code-cpp[System.Char.IsPunctuation#9](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.IsPunctuation/CPP/ispunctuation.cpp#9)]
[!code-csharp[System.Char.IsPunctuation#9](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.IsPunctuation/CS/ispunctuation.cs#9)]
[!code-vb[System.Char.IsPunctuation#9](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.IsPunctuation/VB/ispunctuation.vb#9)]

]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
Expand Down Expand Up @@ -3113,6 +3080,13 @@ When a managed <xref:System.Char> type, which is represented as a Unicode UTF-16

- Dingbats.

## Examples
The following code example demonstrates <xref:System.Char.IsSymbol%2A>.

:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.IsSymbol/CPP/issymbol.cpp" id="Snippet12":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.IsSymbol/CS/issymbol.cs" interactive="try-dotnet" id="Snippet12":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.IsSymbol/VB/issymbol.vb" id="Snippet12":::

]]></format>
</remarks>
</Docs>
Expand Down Expand Up @@ -3183,15 +3157,6 @@ When a managed <xref:System.Char> type, which is represented as a Unicode UTF-16

- Dingbats.



## Examples
The following code example demonstrates <xref:System.Char.IsSymbol%2A>.

[!code-cpp[System.Char.IsSymbol#12](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.IsSymbol/CPP/issymbol.cpp#12)]
[!code-csharp[System.Char.IsSymbol#12](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.IsSymbol/CS/issymbol.cs#12)]
[!code-vb[System.Char.IsSymbol#12](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.IsSymbol/VB/issymbol.vb#12)]

]]></format>
</remarks>
<altmember cref="T:System.Boolean" />
Expand Down Expand Up @@ -3272,15 +3237,6 @@ When a managed <xref:System.Char> type, which is represented as a Unicode UTF-16

- Dingbats.



## Examples
The following code example demonstrates <xref:System.Char.IsSymbol%2A>.

[!code-cpp[System.Char.IsSymbol#12](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.IsSymbol/CPP/issymbol.cpp#12)]
[!code-csharp[System.Char.IsSymbol#12](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.IsSymbol/CS/issymbol.cs#12)]
[!code-vb[System.Char.IsSymbol#12](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.IsSymbol/VB/issymbol.vb#12)]

]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
Expand Down Expand Up @@ -3449,6 +3405,13 @@ When a managed <xref:System.Char> type, which is represented as a Unicode UTF-16

- The characters CHARACTER TABULATION (U+0009), LINE FEED (U+000A), LINE TABULATION (U+000B), FORM FEED (U+000C), CARRIAGE RETURN (U+000D), and NEXT LINE (U+0085).

## Examples
The following example demonstrates the <xref:System.Char.IsWhiteSpace%28System.Char%29> method.

:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.IsWhiteSpace/CPP/iswhitespace.cpp" id="Snippet14":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.IsWhiteSpace/CS/iswhitespace.cs" interactive="try-dotnet" id="Snippet14":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.IsWhiteSpace/VB/iswhitespace.vb" id="Snippet14":::

]]></format>
</remarks>
</Docs>
Expand Down Expand Up @@ -3514,15 +3477,6 @@ When a managed <xref:System.Char> type, which is represented as a Unicode UTF-16

- The characters CHARACTER TABULATION (U+0009), LINE FEED (U+000A), LINE TABULATION (U+000B), FORM FEED (U+000C), CARRIAGE RETURN (U+000D), and NEXT LINE (U+0085).



## Examples
The following example demonstrates the <xref:System.Char.IsWhiteSpace%28System.Char%29> method.

[!code-cpp[System.Char.IsWhiteSpace#14](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.IsWhiteSpace/CPP/iswhitespace.cpp#14)]
[!code-csharp[System.Char.IsWhiteSpace#14](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.IsWhiteSpace/CS/iswhitespace.cs#14)]
[!code-vb[System.Char.IsWhiteSpace#14](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.IsWhiteSpace/VB/iswhitespace.vb#14)]

]]></format>
</remarks>
<altmember cref="T:System.Boolean" />
Expand Down Expand Up @@ -3594,15 +3548,6 @@ When a managed <xref:System.Char> type, which is represented as a Unicode UTF-16

- The characters CHARACTER TABULATION (U+0009), LINE FEED (U+000A), LINE TABULATION (U+000B), FORM FEED (U+000C), CARRIAGE RETURN (U+000D), and NEXT LINE (U+0085).



## Examples
The following code example demonstrates <xref:System.Char.IsWhiteSpace%2A>.

[!code-cpp[System.Char.IsWhiteSpace#14](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.IsWhiteSpace/CPP/iswhitespace.cpp#14)]
[!code-csharp[System.Char.IsWhiteSpace#14](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.IsWhiteSpace/CS/iswhitespace.cs#14)]
[!code-vb[System.Char.IsWhiteSpace#14](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.IsWhiteSpace/VB/iswhitespace.vb#14)]

]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
Expand Down Expand Up @@ -4737,14 +4682,12 @@ This member is an explicit interface member implementation. It can be used only

Use <xref:System.String.ToLower%2A?displayProperty=nameWithType> to convert a string to lowercase.



## Examples
The following example demonstrates <xref:System.Char.ToLower%2A>.

[!code-cpp[System.Char.ToLower#16](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.ToLower/CPP/tolower.cpp#16)]
[!code-csharp[System.Char.ToLower#16](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.ToLower/CS/tolower.cs#16)]
[!code-vb[System.Char.ToLower#16](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.ToLower/VB/tolower.vb#16)]
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.ToLower/CPP/tolower.cpp" id="Snippet16":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.ToLower/CS/tolower.cs" interactive="try-dotnet" id="Snippet16":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.ToLower/VB/tolower.vb" id="Snippet16":::

]]></format>
</remarks>
Expand Down Expand Up @@ -4805,15 +4748,6 @@ This member is an explicit interface member implementation. It can be used only
## Remarks
Use <xref:System.String.ToLower%2A?displayProperty=nameWithType> to convert a string to lowercase.



## Examples
The following code example demonstrates <xref:System.Char.ToLower%2A>.

[!code-cpp[System.Char.ToLower#16](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.ToLower/CPP/tolower.cpp#16)]
[!code-csharp[System.Char.ToLower#16](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.ToLower/CS/tolower.cs#16)]
[!code-vb[System.Char.ToLower#16](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.ToLower/VB/tolower.vb#16)]

]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
Expand Down Expand Up @@ -4945,9 +4879,9 @@ This member is an explicit interface member implementation. It can be used only
## Examples
The following code example demonstrates <xref:System.Char.ToString%2A>.

[!code-cpp[System.Char.ToString#17](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.ToString/CPP/tostring.cpp#17)]
[!code-csharp[System.Char.ToString#17](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.ToString/CS/tostring.cs#17)]
[!code-vb[System.Char.ToString#17](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.ToString/VB/tostring.vb#17)]
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.ToString/CPP/tostring.cpp" id="Snippet17":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.ToString/CS/tostring.cs" interactive="try-dotnet" id="Snippet17":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.ToString/VB/tostring.vb" id="Snippet17":::

]]></format>
</remarks>
Expand Down Expand Up @@ -4999,13 +4933,6 @@ This member is an explicit interface member implementation. It can be used only
<remarks>
<format type="text/markdown"><![CDATA[

## Examples
The following code example demonstrates <xref:System.Char.ToString%2A>.

[!code-cpp[System.Char.ToString#17](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.ToString/CPP/tostring.cpp#17)]
[!code-csharp[System.Char.ToString#17](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.ToString/CS/tostring.cs#17)]
[!code-vb[System.Char.ToString#17](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.ToString/VB/tostring.vb#17)]

]]></format>
</remarks>
<altmember cref="M:System.Char.Parse(System.String)" />
Expand Down Expand Up @@ -5058,15 +4985,6 @@ This member is an explicit interface member implementation. It can be used only
## Remarks
The `provider` parameter is ignored; it does not participate in this operation.



## Examples
The following code example demonstrates an overload of <xref:System.Char.ToString%2A>.

[!code-cpp[System.Char.ToString#17](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Char.ToString/CPP/tostring.cpp#17)]
[!code-csharp[System.Char.ToString#17](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Char.ToString/CS/tostring.cs#17)]
[!code-vb[System.Char.ToString#17](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Char.ToString/VB/tostring.vb#17)]

]]></format>
</remarks>
<altmember cref="M:System.Char.Parse(System.String)" />
Expand Down