Isnumeric in vb2005 does not behave like it does in vb6.0

looks like the Isnumeric in vb2005 does not behave like it does in vb6.0..

when i execute the following line:

Isnumeric("&H-23")

i get this Run-time exception:

System.ArgumentException - String cannot contain a minus sign if the base is not 10.

is there other way i can check if the string can be converted to a number



Answer this question

Isnumeric in vb2005 does not behave like it does in vb6.0

  • Kaumil

    thanks cgraus..

    Tryparse() can do the job, but im trying to check the validity of hex numbers.. looks like TryParse can only check numbers expressed in decimal (am i right )..


  • kilroy73

    int.TryParse and double.TryParse



  • Isnumeric in vb2005 does not behave like it does in vb6.0