Convert string in bianry value format to int in CSharp
Description
The following code shows how to convert string in bianry value format to int.
Example
using System;// w w w. java2 s. co m
public class MainClass {
public static void Main() {
uint five = Convert.ToUInt32("101", 2); // parse in binary
Console.WriteLine(five);
}
}
The code above generates the following result.