/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//To Binary from Integer int startVal = 7; int base = 2; string binary = Convert.ToString(startVal, base); //To Integer From Binary string binary = "111"; int base = 2; int integer = Convert.ToInt32(binary, base);