Convert Magical

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

Guess you like

Origin blog.csdn.net/weixin_34274029/article/details/93499949