System.Convert.ToInt64(String) method exception

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This statement (txtNewOdometer is a variable for an edit box):

lSN = System.Convert.ToInt64(txtNewOdometer.Text);

is causing an exception iff a zero ('0') is entered into the textbox. But
only on one user's computer; works fine on everyone elses.

The exception's Message is "Input string was not in a correct format."

Does anyone have any idea whatsoever on what could be happening, or what
further steps I can take to analyze this problem?

Any help greatly appreciated!
 
David Lowe said:
This statement (txtNewOdometer is a variable for an edit box):

lSN = System.Convert.ToInt64(txtNewOdometer.Text);

Use the TryParse method on Int64.

PS
 
Back
Top