|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
System.Convert.ToInt64(String) method exceptionThis 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! you have a stack Trace of the exception?
VJ Show quote "David Lowe" <DavidL***@discussions.microsoft.com> wrote in message news:CC90BC2F-571A-4458-8BDD-E7C7B595B9D1@microsoft.com... > 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" <DavidL***@discussions.microsoft.com> wrote in message Use the TryParse method on Int64.news:CC90BC2F-571A-4458-8BDD-E7C7B595B9D1@microsoft.com... > This statement (txtNewOdometer is a variable for an edit box): > > lSN = System.Convert.ToInt64(txtNewOdometer.Text); PS Show quote > > 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! |
|||||||||||||||||||||||