
11 Types
11.1 Value types
11.1.3 Simple types
Paragraph 11 C# provides a set of predefined struct types called the simple types. 2 The simple types are identified through reserved words, but these reserved words are simply aliases for predefined struct types in the System namespace, as described in the table below.
| Reserved word | Aliased type |
|---|---|
| sbyte | System.SByte |
| byte | System.Byte |
| short | System.Int16 |
| ushort | System.UInt16 |
| int | System.Int32 |
| uint | System.UInt32 |
| long | System.Int64 |
| ulong | System.UInt64 |
| char | System.Char |
| float | System.Single |
| double | System.Double |
| bool | System.Boolean |
| decimal | System.Decimal |
int i = int.MaxValue; // System.Int32.MaxValue constant string s = i.ToString(); // System.Int32.ToString() instance method string t = 123.ToString(); // System.Int32.ToString() instance methodend example] 2 The simple types differ from other struct types in that they permit certain additional operations:
| |
| Jagger Software Ltd | |
| Company # 4070126 | |
| VAT # 762 5213 42 |