title: Generic TryParse Extension method
body: <p>Code taken from <a href="http://johnnliu.spaces.live.com/Blog/cns!90A843AB92E99F!255.entry" rel="noreferrer">here</a></p>
  
  <p>I would like to hear some expert opinions on this extension method.  I do plan to use it, but would like to hear about any known problems i may face.</p>
  
  <p>Am i better of using on primative types TryParse methods?</p>
  
  <pre><code>public static T? TryParse&lt;T&gt;(this object obj) where T : struct
          {
              if (obj == null) return null;
  
              T? result = null;
              TypeConverter converter = TypeDescriptor.GetConverter(typeof(T));
              if (converter != null)
              {
                  try
                  {
                      string str = obj.ToString();
                      result = (T)converter.ConvertFromString(str);
                  }
                  catch (Exception ex)
                  {
                      throw ex;
                  }
              }
  
              return result;
          }
  </code></pre>