The following sections describe solutions to the preceding problems. You can download the example solutions, to see additional details and to experiment with the programs at https://github.com/PacktPublishing/The-Modern-CSharp-Challenge/tree/master/Chapter05.
Solutions
56. Roman numerals
There are many ways that you could approach this problem. I decided to use lookup tables to make things faster and simpler.
The following code shows a string extension method that converts a Roman numeral string into a long integer:
// Maps letters to numbers.
private static Dictionary<char, long> LetterValues = null;
// Convert Roman numerals into an integer.
public static long ToArabic(this string roman)
{
// Initialize the letter...