mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-21 14:02:02 +02:00
added Decimal type example for C#
This commit is contained in:
@@ -96,7 +96,11 @@ namespace Learning
|
|||||||
// Precision: 15-16 digits
|
// Precision: 15-16 digits
|
||||||
double fooDouble = 123.4;
|
double fooDouble = 123.4;
|
||||||
|
|
||||||
// Bool - true & false
|
// Decimal - a 128-bits data type, with more precision than other floating-point types,
|
||||||
|
// suited for financial and monetary calculations
|
||||||
|
decimal fooDecimal = 150.3m;
|
||||||
|
|
||||||
|
// Boolean - true & false
|
||||||
bool fooBoolean = true;
|
bool fooBoolean = true;
|
||||||
bool barBoolean = false;
|
bool barBoolean = false;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user