title: Using .Net, how can I determine if a type is a Numeric ValueType?
body: <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>