Built-In Types Table
suggest changeThe following table shows the keywords for built-in C# types, which are aliases of predefined types in the System namespace.
| C# type | .NET type |
|---|---|
bool |
System.Boolean |
byte |
System.Byte |
sbyte |
System.SByte |
char |
System.Char |
decimal |
System.Decimal |
double |
System.Double |
float |
System.Single |
int |
System.Int32 |
uint |
System.UInt32 |
long |
System.Int64 |
ulong |
System.UInt64 |
object |
System.Object |
short |
System.Int16 |
ushort |
System.UInt16 |
string |
System.String |
The C# keyword and the .NET type name are interchangeable. For example, either of the following declarations creates an int (they cannot both appear in the same scope):
int number = 123;
System.Int32 number = 123;
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents