How to use "" in a string?

Hi

i just wonder how to make a " " in a string

Exampel:

dim story as string

story = "One day was karl out in the garden. Then, suddenly he heard a voice say "Hello karl", he was  really scared"

messagebox.show("this is a story I made:" & story, "the story")

And one more thing, how do you make a ' not to comment out the line

Exampel story = "he's computer died"

 




Answer this question

How to use "" in a string?

  • JasonRiccio

    hi,

    1) to make the double quote twice

    2) you can use ' in strings without commenting the line out

    Dim story As String = "One day was karl out in the garden. Then, suddenly he heard a voice say ""Hello karl"", he was really scared"

    Dim st As String = "he's computer died"

    messagebox.show(story)

    messagebox.show(st)

    hope this helps



  • lochew

    Double the ":

    story = "One day was karl out in the garden. Then, suddenly he heard a voice say ""Hello karl"", he was really scared"

    As for ' I don't understand... ' does not comment the line when in a string...


  • How to use "" in a string?