Decimal Types and Boolean Variables
Decimal Types

Boolean Variables
•Monetary data items
•As with the float, must attach the suffix ‘m’ or ‘M’
onto the end of a number to indicate decimal
–Float attach ‘f’ or
“F’
•Examples
decimal endowmentAmount = 33897698.26M;
decimal deficit;
Boolean Variables
•Based
on true/false, on/off logic
•Boolean
type in C# → bool
•Does
not accept integer values such as 0, 1, or -1
bool undergraduateStudent;
bool moreData = true;
Comments
Post a Comment