Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
C#
int to binary string with 4 characters
Steve
Programming language:
C#
2021-03-21 10:47:01
7
Q:
int to binary string with 4 characters
Noman
Code:
C#
2021-03-12 04:35:48
Convert.ToString(3, 2).PadLeft(4, '0') // 0011 Convert.ToString(3, 2).PadLeft(8, '0') // 00000011
0
Tags
string
int
binary
character
characters
New to Communities?
Join the community