In binary:
ASCII character (string): 0011 0101
UTF-8 unicode (string): 0011 0101
Unsigned decimal(16): 0000 0000 0000 0101
Unsigned decimal(32): 0000 0000 0000 0000 0000 0000 0000 0101
Floating Point (float): 0100 0000 1010 0000 0000 0000 0000 0000
Double (double): 0100 0000 0001 0100 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
This is why, in C#, a conversion must take place. Note that in C++ and
some other languages, the conversion is implicit.
int i;
double d;
string s;
// input the number
Console.Write( "Enter a number: " );
s = Console.ReadLine( );
i = Convert.ToInt32( s );
d = Convert.ToDouble( s );
// output the number
Console.WriteLine( s );
Console.WriteLine( i.ToString( ) );
Console.WriteLine( d.ToString( ) );
or of course...
i = Convert.ToInt32( Console.ReadLine() );
d = Convert.ToDouble( Console.ReadLine() );