Posted By

clinaq on 06/24/17


decimal String toString binary integer conversion convert c#

Versions (?)

C# - Convert decimal value of integer type to binary value of string type

 / Published in: C#


Microsoft Official Documentation:

  1. int DecimalValue;
  2. string ValueInBinary;
  3. ValueInBinary= Convert.ToString(DecimalValue, 2); //DecimalValue in integer type is converted to a string in binary - base of 2 form 'ValueInBinary'

Report this snippet  

You need to login to post a comment.