c# - How to convert number (dec) to binary (bin) number and from bin to dec? -


how convert number (dec) binary (bin) number , bin dec using c# , winforms?

try this

string binvalue = convert.tostring(myint, 2);  int intvalue = convert.toint32(mybinary, 2); 

example:

 string binvalue = convert.tostring(16, 2); // = 10000   int intvalue = convert.toint32("11010", 2);  // = 26 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -