Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Validate value as int32

Validate value as int32

Scheduled Pinned Locked Moved Visual Basic
help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rip V Winkle
    wrote on last edited by
    #1

    I'm writing a console app that when the user types in a number it gets stored into an arraylist. When they type in certain commands it does misc. things, therefore the input is set to string. However if they type an invalid string that is not one of the preset commands or an integer I want to give them an error message. The issue I'm running into is checking wether the string is an integer or not. If someone can point me into the right direction I would appreciate it. Thanks in advance. :> To see one's self from another's point of view is an opportunity not to be passed up.

    G 1 Reply Last reply
    0
    • R Rip V Winkle

      I'm writing a console app that when the user types in a number it gets stored into an arraylist. When they type in certain commands it does misc. things, therefore the input is set to string. However if they type an invalid string that is not one of the preset commands or an integer I want to give them an error message. The issue I'm running into is checking wether the string is an integer or not. If someone can point me into the right direction I would appreciate it. Thanks in advance. :> To see one's self from another's point of view is an opportunity not to be passed up.

      G Offline
      G Offline
      Guillermo Rivero
      wrote on last edited by
      #2

      Try using Int32.Parse() This function converts a string into a Int32 type. You can find more info in Help Free your mind...

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups