Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b224e41

Browse filesBrowse files
Mention C# native integers in IntPtr/UIntPtr docs (#7364)
* Update IntPtr.xml * Update UIntPtr.xml
1 parent d88edb1 commit b224e41
Copy full SHA for b224e41

File tree

Expand file treeCollapse file tree

2 files changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-0
lines changed

‎xml/System/IntPtr.xml

Copy file name to clipboardExpand all lines: xml/System/IntPtr.xml
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@
107107
The <xref:System.IntPtr> type is CLS-compliant, while the <xref:System.UIntPtr> type is not. Only the <xref:System.IntPtr> type is used in the common language runtime. The <xref:System.UIntPtr> type is provided mostly to maintain architectural symmetry with the <xref:System.IntPtr> type.
108108
109109
This type implements the <xref:System.Runtime.Serialization.ISerializable>, and, in .NET 5.0 and later, the <xref:System.IFormattable> interfaces.
110+
111+
In C# starting from version 9.0, you can use the built-in `nint` type to define native-sized integers. This type is represented by the <xref:System.IntPtr> type internally and provides operations and conversions that are appropriate for integer types. For more information, see [nint and nuint types](/dotnet/csharp/language-reference/builtin-types/nint-nuint).
110112
111113
## Examples
112114

‎xml/System/UIntPtr.xml

Copy file name to clipboardExpand all lines: xml/System/UIntPtr.xml
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@
110110
The <xref:System.UIntPtr> type can be used by languages that support pointers, and as a common means of referring to data between languages that do and do not support pointers. <xref:System.UIntPtr> objects can also be used to hold handles.
111111
112112
This type implements the <xref:System.Runtime.Serialization.ISerializable>, and, in .NET 5.0 and later, the <xref:System.IFormattable> interfaces.
113+
114+
In C# starting from version 9.0, you can use the built-in `nuint` type to define native-sized integers. This type is represented by the <xref:System.UIntPtr> type internally and provides operations and conversions that are appropriate for integer types. For more information, see [nint and nuint types](/dotnet/csharp/language-reference/builtin-types/nint-nuint).
113115
114116
]]></format>
115117
</remarks>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.