IsNumeric function taking exponential value as true

I have a list of string, some numbers and some mixture of numbers and characters. By using the IsNumeric function, all is fine until i encountered a string “5e1” where the string is recognized as numeric by taking e as exponential.

Is there any workaround to this, besides looping each character in the string? I want to avoid that as some strings numeric, but long which affects the performance.

Hi @AlvinBD

Did u use string variable.IsNumeric as code

Hi Nived,

I couldnt do that as my variable is of string type, and there is no IsNumeric function available.

@AlvinBD

Check as below

Hope this may helps

Thanks

2 Likes

Thanks ksrinu,

I used TryParse instead as I as I using it in an IF statement. Thank you for your help!

1 Like