>Hello All,
>
>I have a string variable that I am trying to convert to integer but I get the following error :
>
>Input string was not in a correct format.
>
>
>here is the code:
>
>
>int lnQ0940;
>lnQ0940 = Int32.Parse("0x00E0",NumberStyles.Any);
>
>
>
>I have also tried the following :
>
>lnQ0940 = Int32.Parse("0x00E0",NumberStyles.HexNumber);
>
>
>but keep getting the same error.
>
>I have been reading the help files but can not figure it out.
>Any help is greatly appreciated.
>
>
>Thanks,
>Sergio
Apparently the Parse function does not like the 0x identifier. Remove it and you will have good results.
lnQ0940 = Int32.Parse("00E0",NumberStyles.HexNumber);
Brian Seekford
Seekford Solutions, Inc.http://www.SeekfordSolutions.comInternet ActiveX Controls and .NET Class Libraries.
SMTP/S FTP POP3/S HTTP/S SNTP MIME PING WHOIS TRACEROUTE NNTP DNS MX
Base64, UUEncode, yEnc, MD5, SHA1, URL, Quoted-Printable.
Resizer and Tooltips
Email Verification and more. Check us out!