public static int ParseFprName(string RegisterName) { if (RegisterName[0] == 'f') { return Convert.ToInt32(RegisterName.Substr(1)); } throw (new InvalidDataException()); }