convert an integer to base 2 c# code example Example: convert-integer-to-binary-in-c-sharp int value = 8; string binary = Convert.ToString(value, 2);