Skip to content

Commit

Permalink
[Edit] C#: Data Types
Browse files Browse the repository at this point in the history
Hello, there! I hope you are doing well!

This pull request addresses two minor corrections in the documentation:

1. nuint vs. unint: The correct term for the unsigned native integer type in C# is nuint, not unint.

2. sbyte Terminology: It is more common and accurate to refer to sbyte as a "Signed Byte" rather than "Short Byte."

Sources:

    [a] https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/integral-numeric-types#sbyte

    [b] https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/integral-numeric-types

Thank you for your attention to this matter and for the article!
  • Loading branch information
brasoares authored Mar 3, 2025
1 parent 21b0012 commit e44990a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/c-sharp/concepts/data-types/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ Value types are data types that are built-in to C#. The available types and thei
| --------- | ----------------------- | ------------ |
| `bool` | Boolean | 1 byte |
| `byte` | Byte | 1 byte |
| `sbyte` | Short Byte | 1 byte |
| `sbyte` | Signed Byte | 1 byte |
| `char` | Character | 2 bytes |
| `decimal` | Decimal | 16 bytes |
| `double` | Double | 8 bytes |
| `float` | Float | 4 bytes |
| `int` | Integer | 4 bytes |
| `uint` | Unsigned Integer | 4 bytes |
| `nint` | Native Integer | 4 or 8 bytes |
| `unint` | Unsigned Native Integer | 4 or 8 bytes |
| `nuint` | Unsigned Native Integer | 4 or 8 bytes |
| `long` | Long | 8 bytes |
| `ulong` | Unsigned Long | 8 bytes |
| `short` | Short | 2 bytes |
Expand All @@ -51,7 +51,7 @@ float heightOfGiraffe = 908.32f;
int seaLevel = -24;
uint year = 2023u;
nint pagesInBook = 412;
unint milesToNewYork = 2597;
nuint milesToNewYork = 2597;
long circumferenceOfEarth = 25000l;
ulong depthOfOcean = 28000ul;
short tableHeight = 4;
Expand Down

0 comments on commit e44990a

Please sign in to comment.