Primitive Data Types and Variables - EEMB DERSLER
Primitive Data Types and Variables - EEMB DERSLER
Primitive Data Types and Variables - EEMB DERSLER
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Floating Floating-Point Point <strong>and</strong> Decimal<br />
Floating Floating-Point Point <strong>Types</strong><br />
Example 02 02-03;02 03;02-04 04<br />
The Boolean data type: type<br />
The Boolean <strong>Data</strong> Type<br />
Is declared by the bool keyword<br />
Has two possible values values: : true <strong>and</strong> false<br />
Is useful in logical expressions<br />
The default value is false<br />
Boolean Type<br />
Example 02 02-05; 05; 02-06 02 06<br />
21<br />
Boolean Type<br />
Boolean Values – Example<br />
Example of boolean variables taking values of<br />
true or false false:<br />
int a = 1;<br />
int b = 2;<br />
bool greaterAB = (a > b);<br />
Console.WriteLine(greaterAB); // False<br />
bool equalA1 = (a == 1);<br />
Console.WriteLine(equalA1); // True<br />
Character Type<br />
10/3/2011<br />
22<br />
4