Posted By

clinaq on 06/24/17


Tagged

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#
 

URL: https://msdn.microsoft.com/en-us/library/8s62fh68(v=vs.110).aspx

Microsoft Official Documentation: https://msdn.microsoft.com/en-us/library/8s62fh68(v=vs.110).aspx

  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.