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. Display String With Quotes

Display String With Quotes

Scheduled Pinned Locked Moved Visual Basic
helpquestion
4 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.
  • D Offline
    D Offline
    Dan Suthar
    wrote on last edited by
    #1

    Hi everyone, Here I have a strange problem. I am working on a console application. I use the following code to print : Welcome console.writeline("Welcome") Now I want to print: "Welcome" I want to print it with quotes. but , console.writeline(" "Welcome" ") gives me an error. So, what to do to print a word with quotes?? Thanks For any help, Dan

    C N 2 Replies Last reply
    0
    • D Dan Suthar

      Hi everyone, Here I have a strange problem. I am working on a console application. I use the following code to print : Welcome console.writeline("Welcome") Now I want to print: "Welcome" I want to print it with quotes. but , console.writeline(" "Welcome" ") gives me an error. So, what to do to print a word with quotes?? Thanks For any help, Dan

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Not strange at all. How would the compiler know when " means a quote you want to print, or when it means a quote, in the usual sense ? console.writeline("\"Welcome\"") Assuming it works the same as C#. f not, you'll have to google to find the VB syntax.

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      1 Reply Last reply
      0
      • D Dan Suthar

        Hi everyone, Here I have a strange problem. I am working on a console application. I use the following code to print : Welcome console.writeline("Welcome") Now I want to print: "Welcome" I want to print it with quotes. but , console.writeline(" "Welcome" ") gives me an error. So, what to do to print a word with quotes?? Thanks For any help, Dan

        N Offline
        N Offline
        Nilesh Hapse
        wrote on last edited by
        #3

        For VB you can use console.writeline("""Welcome""")

        D 1 Reply Last reply
        0
        • N Nilesh Hapse

          For VB you can use console.writeline("""Welcome""")

          D Offline
          D Offline
          Dan Suthar
          wrote on last edited by
          #4

          Thanks for help .

          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