Answer the question
In order to leave comments, you need to log in
Converting from decimal to binary and back in C#?
How to quickly convert from decimal to binary in C#?
And how to add zeros when converting from binary to decimal:
int i = Convert.ToInt32("2");
Console.WriteLine(Convert.ToString(i, 2));
Answer the question
In order to leave comments, you need to log in
Read about string formatting on the official site , and choose the implementation that suits you best.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question