Essential Types C# Book

using System;
using System.Text;
using System.Globalization;
class Sample
{
public static void Main()
{
int thirty = Convert.ToInt32("1E", 16); // Parse in hexadecimal
Console.WriteLine(thirty);
uint five = Convert.ToUInt32("101", 2); // Parse in binary
Console.WriteLine(five);
}
}
The output:
30
5