Dec 8, 2003 #1 B bips Newcomer Joined Dec 8, 2003 Messages 3 How to convert decimal to binary in C#? Is there any built-in library function for it ?
Dec 9, 2003 #2 H Hamburger1984 Centurion Joined Jun 12, 2003 Messages 162 Location Hamburg,Germany Code: int myNumber = 234; string myBinaryString = ""; myBinaryString = System.Convert.ToString(myNumber,2); Console.WriteLine(myBinaryString); that should do the trick - hope I didn't misstype anything (aircoded).. Andreas
Code: int myNumber = 234; string myBinaryString = ""; myBinaryString = System.Convert.ToString(myNumber,2); Console.WriteLine(myBinaryString); that should do the trick - hope I didn't misstype anything (aircoded).. Andreas