Same code to parse int, float, decimal? I have a method to parse strings. It can be used to parse a float using a specific culture and then get a new string with a specific out-culture. The same applies to ints, doubles and decimals. 

The code that I've written is quite repetitive for each of the different parse methods which makes it hard to maintain (especially as I am just about to make the method a lot more complex).

Is it possible to make this code less repetitive? 

if (mapping.ParseDecimal)
{
    decimal i;
    if (decimal.TryParse(value, numberStyle, inCulture, out i))
    {
        return i.ToString(outCulture);
    }
    else
    {
        if (logger.IsDebugEnabled)
            logger.DebugFormat("Could not parse value \"{0\" to a decimal using the culture \"{1}\".", value, inCulture);
    }
}
else if (mapping.ParseDouble)
{
    double i;
    if (double.TryParse(value, numberStyle, inCulture, out i))
    {
        return i.ToString(outCulture);
    }
    else
    {
        if (logger.IsDebugEnabled)
            logger.DebugFormat("Could not parse value \"{0\" to a double using the culture \"{1}\".", value, inCulture);
    }
}
else if (mapping.ParseFloat)
{
    float i;
    if (float.TryParse(value, numberStyle, inCulture, out i))
    {
        return i.ToString(outCulture);
    }
    else
    {
        if (logger.IsDebugEnabled)
            logger.DebugFormat("Could not parse value \"{0\" to a float using the culture \"{1}\".", value, inCulture);
    }
}
else if (mapping.ParseInt)
{
    int i;
    if (int.TryParse(value, numberStyle, inCulture, out i))
    {
        return i.ToString(outCulture);
    }
    else
    {
        if (logger.IsDebugEnabled)
            logger.DebugFormat("Could not parse value \"{0\" to a int using the culture \"{1}\".", value, inCulture);
    }
}
If repetition is your primary concern, you could try doing something like this:

public delegate string ParserMethod(string value, NumberStyles numberStyle, CultureInfo inCulture, CultureInfo outCulture);

public static class NumericParser
{
    public static readonly ParserMethod ParseInt = Create&lt;int&gt;(int.TryParse);
    public static readonly ParserMethod ParseFloat = Create&lt;float&gt;(float.TryParse);
    public static readonly ParserMethod ParseDouble = Create&lt;double&gt;(double.TryParse);
    public static readonly ParserMethod ParseDecimal = Create&lt;decimal&gt;(decimal.TryParse);

    public static Logger Logger { get; set; }

    delegate bool TryParseMethod&lt;T&gt;(string s, NumberStyles style, IFormatProvider provider, out T result);
    static ParserMethod Create&lt;T&gt;(TryParseMethod&lt;T&gt; tryParse) where T : IFormattable
    {
        return (value, numberStyle, inCulture, outCulture) =&gt;
        {
            T result;
            if (tryParse(value, numberStyle, inCulture, out result))
            {
                return result.ToString(null, outCulture);
            }
            else
            {
                if (Logger != null &amp;&amp; Logger.IsDebugEnabled)
                    Logger.DebugFormat("Could not parse value \"{0}\" to a {1} using the culture \"{2}\".", value, typeof(T).Name, inCulture);
                return "";
            }
        };
    }
}


This way, you only have to pass around the appropriate ParserMethod you want to use.  In your case, you could map your different mapping values to the appropriate ParserMethod.  And call it when needed.