Skip to content

Commit 46c4031

Browse files
Mention the 'decimal' simple type in Built-in types (#43186)
1 parent 46d3873 commit 46c4031

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/csharp/language-reference/builtin-types/value-types.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,12 @@ C# provides the following built-in value types, also known as *simple types*:
4747

4848
All simple types are structure types and differ from other structure types in that they permit certain additional operations:
4949

50-
- You can use literals to provide a value of a simple type. For example, `'A'` is a literal of the type `char` and `2001` is a literal of the type `int`.
50+
- You can use literals to provide a value of a simple type.
51+
<br/>For example, `'A'` is a literal of the type `char`, `2001` is a literal of the type `int` and `12.34m` is a literal of the type `decimal`.
5152

52-
- You can declare constants of the simple types with the [const](../keywords/const.md) keyword. It's not possible to have constants of other structure types.
53+
- You can declare constants of the simple types with the [const](../keywords/const.md) keyword.
54+
<br/>For example, you can define `const decimal = 12.34m`.
55+
<br/>It's not possible to have constants of other structure types.
5356

5457
- Constant expressions, whose operands are all constants of the simple types, are evaluated at compile time.
5558

0 commit comments

Comments
 (0)