Built-in types in C# Boolean type: only true or false Integral types: sbyte, byte, short, ushort, int, uint, long, ulong, char Floating types: float and double Decimal types String type using System ; class Program { static void Main ( ) { //boolean data type declaration bool b = true ; Console . WriteLine ( b ) ; //Integral types Console . WriteLine ( " sbyte: min value: {0} , max value: {1} " , sbyte . MinValue , sbyte . MaxValue ) ; Console . WriteLine ( " byte: min value: {0} , max value: {1} " , byte . MinValue , byte . MaxValue ) ; Console . WriteLine ( " short: min value: {0} , max value: {1} " , short . MinValue , short . MaxValue ) ; Console . WriteLine ( " ushort: min value: {0} , max value: {1} " , ushort . MinValue , ushort . MaxValue ) ; Console . WriteLine ( " int: min value: {0} , max value: {1} " , ...
Comments
Post a Comment