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
Post a Comment