<p>But here's an example:</p>

<pre><code>Dim desiredType as Type
if IsNumeric(desiredType) then ...
</code></pre>

<p><strong>EDIT:</strong> I only know the Type, not the Value as a string.</p>

<p>Ok, so unfortunately I have to cycle through the TypeCode.</p>

<p>But this is a nice way to do it:</p>

<pre><code> if ((desiredType.IsArray))
      return 0;

 switch (Type.GetTypeCode(desiredType))
 {
      case 3:
      case 6:
      case 7:
      case 9:
      case 11:
      case 13:
      case 14:
      case 15:
          return 1;
 }
 ;return 0;
</code></pre>

You can find out if a variable is numeric using the
```
Type.GetTypeCode()
```
method:
```
```
TypeCode typeCode = Type.GetTypeCode(desiredType);

if (typeCode == TypeCode.Double || typeCode == TypeCode.Integer || ...)
     return true;
```
```
You'll need to complete all the available numeric types in the "..." part ;)
More details here:
TypeCode Enumeration