Parse a specified arithmetic type from string
I'd prefer to use a dictionary for this.  

private delegate bool TryParseDelegate&lt;T&gt;(string text, out T value);

private static readonly Dictionary&lt;Type, object&gt; TryParsers = new Dictionary&lt;Type, object&gt;
{
    { typeof(int), (TryParseDelegate&lt;int&gt;)int.TryParse },
    { typeof(float), (TryParseDelegate&lt;float&gt;)float.TryParse },
    { typeof(double), (TryParseDelegate&lt;double&gt;)double.TryParse }
};


The TryParse method:

public static bool TryParse&lt;T&gt;(string value, out T returnValue)
{
    // Check if we have a parse method for T in the dictionary.
    object parserObj;
    if (TryParsers.TryGetValue(typeof(T), out parserObj))
    {
        TryParseDelegate&lt;T&gt; parser = (TryParseDelegate&lt;T&gt;)parserObj;
        return parser(value, out returnValue);
    }
    // If no, fallback to IConvertible.
    if (typeof(IConvertible).IsAssignableFrom(typeof(T)))
    {
        try
        {
            returnValue = (T)Convert.ChangeType(value, typeof(T));
            return true;
        }
        catch { }
    }
    // No luck.
    returnValue = default(T);
    return false;
}




This approach support exensibility.
For example, imagine we have a class A:

public class A
{
    public static readonly A Zero = new A("Zero");
    public static readonly A One = new A("One");

    public readonly string Text;

    private A(string text)
    {
        Text = text;
    }

    public static bool TryParse(string text, out A value)
    {
        switch (text.ToLower())
        {
            case "zero":
                value = Zero;
                break;
            case "one":
                value = One;
                break;
            default:
                value = null;
                return false;
        }
        return true;
    }

    public override string ToString()
    {
        return Text;
    }
}


Then the only thing you have to do is to append an item to the dictionary:

{ typeof(A), (TryParseDelegate&lt;A&gt;)A.TryParse }


Let's test it:

int i;
double d;
A a;

if (TryParse("123", out i))
    Console.WriteLine($"i={i}"); // Prints i=123
if (TryParse("123.456", out d))
    Console.WriteLine($"d={d}"); // Prints d=123.456
if (TryParse("ONE", out a))
    Console.WriteLine($"a={a}"); // Prints a=One