Results 1 to 3 of 3

Thread: [RESOLVED] Windows 10 - Unexplained InvalidCastException ???

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2016
    Location
    Pretoria, South Africa
    Posts
    44

    Resolved [RESOLVED] Windows 10 - Unexplained InvalidCastException ???

    I have some code the decrypts some text and then casts it to a decimal value. With windows 7 it works fine, but on another computer running windows 10 it throws an exception stating "83.96" cannot be cast to type decimal??

    Code:
    dim deciphertext as string = "83.96"
    dim dec_value as decimal = CDec(deciphertext)   'Throws exception here
    How is this even possible? Some google answers suggest is might be something to do with the cultureinfo.currentculture on this specific machine, but the answers are very vague.

    Any help on where to start repairing would be greatly appreciated.
    Last edited by Vegito_ZA; Nov 29th, 2016 at 02:55 PM. Reason: Typo

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width