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. C#
  4. I can't convert a var string to a var int

I can't convert a var string to a var int

Scheduled Pinned Locked Moved C#
help
3 Posts 3 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.
  • T Offline
    T Offline
    tinh cau
    wrote on last edited by
    #1

    help me

    G A 2 Replies Last reply
    0
    • T tinh cau

      help me

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      It would be helpful if you informed us about the reason for your inability to convert the string. If the string contains anything that can be converted to an int, it's easy: myInt = Convert.ToInt32(myString) --- b { font-weight: normal; }

      1 Reply Last reply
      0
      • T tinh cau

        help me

        A Offline
        A Offline
        Andrew Kirillov
        wrote on last edited by
        #3

        Hello May be you need to try this: int.Parse( str ) or this: Convert.ToInt32( str ) With best regards, Andrew Kirillov, MCP x 3 Prize winner, August 2005

        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