How can I convert a binary string, such as 1001101
to Decimal? (77)
How can I convert a binary string, such as 1001101
to Decimal? (77)
The Convert.ToInt32
method has an overload that accepts a base parameter.
Convert.ToInt32("1001101", 2).ToString();