Convert an integer to a binary string with leading zeros

前端 未结 6 2081
醉酒成梦
醉酒成梦 2021-02-05 01:24

I need to convert int to bin and with extra bits.

string aaa = Convert.ToString(3, 2);

it returns 11, but I need 0011

6条回答
提交回复
热议问题