Gold Gold - 1 year ago 96
C# Question

How to convert binary to decimal

How can I convert a binary string, such as

to Decimal? (77)

Answer Source

The Convert.ToInt32 method has an overload that accepts a base parameter.

Convert.ToInt32("1001101", 2).ToString();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download