So, check TryParse
MSDN:
The TryParse method is like the Parse method, except this method does not
throw an exception if the conversion fails. If the conversion succeeds, the
return value is true and the result parameter is set to the outcome of the
conversion. If the conversion fails, the return value is false and the
result parameter is set to zero.
HTH
Alex
"Stephan Bour" <sb***@niaid.nih.gov> wrote in message
news:BBCEA49C.B6D7%sb***@niaid.nih.gov...
Actually, IsNumeric does two things: converts a string and returns a
boolean true if the resulting expression is recognized as a number. Parse only
converts a string representation of a number to double. I need the boolean
return to validate a text box entry that can't be easily checked with a
validator.
Stephan.
in article eu**************@tk2msftngp13.phx.gbl, AlexS at
sa***********@SPAMsympaticoPLEASE.ca wrote on 11/5/03 14:39:
Check Parse and TryParse methods for corresponding types, Int, Long etc.
HTH
Alex
"Stephan Bour" <sb***@niaid.nih.gov> wrote in message
news:BBCE9144.B64C%sb***@niaid.nih.gov... IS there a C# equivalent to the VB IsNumeric function?