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. vb.net extracting the first letter of a string

vb.net extracting the first letter of a string

Scheduled Pinned Locked Moved Visual Basic
csharphelp
5 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.
  • C Offline
    C Offline
    culbysl
    wrote on last edited by
    #1

    I'm pretty new at programming, and could sure use some help. I am trying to pull the first letter from a textbox string. I have looked through all of my reference material and old code but can't seem to find it. Please help, thanks. culbysl

    M D C 3 Replies Last reply
    0
    • C culbysl

      I'm pretty new at programming, and could sure use some help. I am trying to pull the first letter from a textbox string. I have looked through all of my reference material and old code but can't seem to find it. Please help, thanks. culbysl

      M Offline
      M Offline
      Marc 0
      wrote on last edited by
      #2

      I think you need txtSomeTextBox.Text.Substring(0, 1) :). Pompiedompiedom... ;)


      "..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.." -- Mark McCormick

      1 Reply Last reply
      0
      • C culbysl

        I'm pretty new at programming, and could sure use some help. I am trying to pull the first letter from a textbox string. I have looked through all of my reference material and old code but can't seem to find it. Please help, thanks. culbysl

        D Offline
        D Offline
        Dave Doknjas
        wrote on last edited by
        #3

        Char firstchar = yourtextbox.Text.Chars(0) David Anton www.tangiblesoftwaresolutions.com Instant C#: VB.NET to C# Converter Instant VB: C# to VB.NET Converter Instant C++: C# to C++ Converter Instant J#: VB.NET to J# Converter Clear VB: Cleans up outdated VB.NET code

        D 1 Reply Last reply
        0
        • D Dave Doknjas

          Char firstchar = yourtextbox.Text.Chars(0) David Anton www.tangiblesoftwaresolutions.com Instant C#: VB.NET to C# Converter Instant VB: C# to VB.NET Converter Instant C++: C# to C++ Converter Instant J#: VB.NET to J# Converter Clear VB: Cleans up outdated VB.NET code

          D Offline
          D Offline
          Dave Doknjas
          wrote on last edited by
          #4

          Sorry - mixing up my languages there. Should be: Dim firstchar As Char = yourtextbox.Text.Chars(0) or simply (in 2005 only): Dim firstchar As Char = yourtextbox.Text(0) David Anton www.tangiblesoftwaresolutions.com Instant C#: VB.NET to C# Converter Instant VB: C# to VB.NET Converter Instant C++: C# to C++ Converter Instant J#: VB.NET to J# Converter Clear VB: Cleans up outdated VB.NET code

          1 Reply Last reply
          0
          • C culbysl

            I'm pretty new at programming, and could sure use some help. I am trying to pull the first letter from a textbox string. I have looked through all of my reference material and old code but can't seem to find it. Please help, thanks. culbysl

            C Offline
            C Offline
            culbysl
            wrote on last edited by
            #5

            Thanks Marc and David for your help. I'm off and running on this end now. culbysl

            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