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. how to add " to a string

how to add " to a string

Scheduled Pinned Locked Moved C#
databasetutorial
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.
  • U Offline
    U Offline
    uowzd01
    wrote on last edited by
    #1

    Can anyone please teach me how to add " into string, I was writing sql statement and need " in it. Thank you in advance.

    E 1 Reply Last reply
    0
    • U uowzd01

      Can anyone please teach me how to add " into string, I was writing sql statement and need " in it. Thank you in advance.

      E Offline
      E Offline
      Edmundisme
      wrote on last edited by
      #2

      string noQuotes = "no quotes"; string hasQuotes = "\"has quotes\"";

      E U 2 Replies Last reply
      0
      • E Edmundisme

        string noQuotes = "no quotes"; string hasQuotes = "\"has quotes\"";

        U Offline
        U Offline
        uowzd01
        wrote on last edited by
        #3

        Thank you so much for your help

        1 Reply Last reply
        0
        • E Edmundisme

          string noQuotes = "no quotes"; string hasQuotes = "\"has quotes\"";

          E Offline
          E Offline
          Ennis Ray Lynch Jr
          wrote on last edited by
          #4

          When you create strings special characters require an escape sequence. Any unicode character can be escaped by using \u and the unicode value, \uFEFF is one I am using because of some pdf issue. Newlines are \n tabs are \t a \ is \\.


          File Not Found

          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