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. ASC() in C#

ASC() in C#

Scheduled Pinned Locked Moved C#
csharpquestion
6 Posts 5 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.
  • E Offline
    E Offline
    econner
    wrote on last edited by
    #1

    Hello, I am looking for the C# equiv of the VB ASC() function. I also believe some of my chars are extended chars above 127. I tried i = Convert.ToInt32('???') but this doesnt seem to work on extended chars.

    M 1 Reply Last reply
    0
    • E econner

      Hello, I am looking for the C# equiv of the VB ASC() function. I also believe some of my chars are extended chars above 127. I tried i = Convert.ToInt32('???') but this doesnt seem to work on extended chars.

      M Offline
      M Offline
      Meysam Mahfouzi
      wrote on last edited by
      #2

      You can have access to every VB.Net function by just adding a referece to visulbasic.dll or visulbasicruntime(or some thing like this, I don't remember!) and using it in your code.


      Don't forget, that's

      Persian Gulf

      not Arabian gulf!

      T 1 Reply Last reply
      0
      • M Meysam Mahfouzi

        You can have access to every VB.Net function by just adding a referece to visulbasic.dll or visulbasicruntime(or some thing like this, I don't remember!) and using it in your code.


        Don't forget, that's

        Persian Gulf

        not Arabian gulf!

        T Offline
        T Offline
        Tatham
        wrote on last edited by
        #3

        You should just be able to do this: char myCharacter = 'a'; int myASC = (int)myCharacter; Tatham Oddie (VB.NET/C#/ASP.NET/VB6/ASP/JavaScript) tatham@e-oddie.com +61 414 275 989

        B 1 Reply Last reply
        0
        • T Tatham

          You should just be able to do this: char myCharacter = 'a'; int myASC = (int)myCharacter; Tatham Oddie (VB.NET/C#/ASP.NET/VB6/ASP/JavaScript) tatham@e-oddie.com +61 414 275 989

          B Offline
          B Offline
          Bo Hunter
          wrote on last edited by
          #4

          No you can not. Only for basic characters. Bo Hunter

          Bo Hunter

          T 1 Reply Last reply
          0
          • B Bo Hunter

            No you can not. Only for basic characters. Bo Hunter

            Bo Hunter

            T Offline
            T Offline
            Tatham
            wrote on last edited by
            #5

            Bo Hunter wrote: No you can not So how do you do it? I'm sure they wouldn't have excluded the capability from the C# libraries... :confused:

            F 1 Reply Last reply
            0
            • T Tatham

              Bo Hunter wrote: No you can not So how do you do it? I'm sure they wouldn't have excluded the capability from the C# libraries... :confused:

              F Offline
              F Offline
              freshthinking
              wrote on last edited by
              #6

              you can do it. run it for yourself.

              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