Dec 8, 2003 #1 B bips New member 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 Well-known member 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 didnt 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 didnt misstype anything (aircoded).. Andreas
Dec 11, 2003 #3 B bips New member Joined Dec 8, 2003 Messages 3 thanx Hamburger ! that works perfect.