Extension method to check whether a string is valid integer, double, bool etc
<p>I'm trying to create an extension method for <code>string</code> that says whether the string is a valid integer, double, bool or decimal. I'm not interested in <strong>switch..case</strong> and trying to use generics.</p>

<p><strong>Extension method</strong></p>

<pre><code>public static bool Is&lt;T&gt;(this string s)
{
   ....
}
</code></pre>

<p><strong>Usage</strong></p>

<pre><code>string s = "23";

if(s.Is&lt;int&gt;())
{
   Console.WriteLine("valid integer");
}
</code></pre>

<p>I couldn't able to succeed on implementing the extension method. I'm looking for some ideas/suggestions...</p>
