(1) Convert decimal to binary
int x = 10;
string s = Convert.ToString(x, 2);
(2) Convert decimal to octal
string s = Convert.ToString(x, 8);
(3) Convert decimal to hexadecimal
string s = Convert.ToString(x, 16);
(4) Binary to decimal conversion
x = Convert.ToInt32(s1, 2);
(5) Convert octal to decimal
x = Convert.ToInt32(s1, 8);
(6) Convert hexadecimal to decimal
x = Convert.ToInt32(s1, 16);
-