which version of the code below is right?
<p>Hi I found this function in a utilities code file:</p>

<p><strong>Version 1:</strong></p>

<pre><code>public static bool IsValidLong(string strLong)
{
    bool result = true;
    try
    {
        long tmp = long.Parse(strLong);
    }
    catch (Exception ex)
    {
        result = false;
    }
    return result;
}
</code></pre>

<p>I want to replace this (and validators for other types) with following:</p>

<p><strong>Version 2:</strong></p>

<pre><code>public static bool IsValidLong(string strLong)
{
    long l;
    return long.TryParse(strLong, out l);
}
</code></pre>

<p>which version is better and why?</p>
