Но вот пример:
Dim desiredType as Type
if IsNumeric(desiredType) then ...
EDIT: Я знаю только тип, а не значение как строку.
Хорошо, к сожалению, мне приходится циклически переключаться с помощью TypeCode.
Но это хороший способ сделать это:
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;