I'm trying to make the following lines to work:

int i = int.Parse("0xA");
Console.WriteLine(i);

i.e: i want parse to take the hex number, convert it to int and print it.

As I read in the manual, we can add another parameter to Parse - FormatProvider, that will do the task, but I can't understand how to use that FormatProvider.

Anyone has a solution?