Today, we stumbled
Convert.ToString () as well as binary conversion function, especially about the record, for later use.
//
Decimal Binary turn
Console.WriteLine (Convert.ToString ( 69 , 2 )); // Decimal turn octal Console.WriteLine (Convert.ToString ( 69 , 8 )); // decimal convert hexadecimal Console.WriteLine ( Convert.ToString ( 69 , 16 )); // binary decimal Console.WriteLine (Convert.ToInt32 ( " 100 111 101 ", 2 )); // octal decimal turn Console.WriteLine (Convert.ToInt32 ( " 76 ", . 8 ) ); // data from hexadecimal decimal Console.WriteLine (Convert.ToInt32 ( "the FF", 16 ));
Convert really strong!
Reproduced in: https: //www.cnblogs.com/yangjie5188/archive/2008/04/15/1154439.html