NotSoSmartGuy Posted May 9, 2010 Share Posted May 9, 2010 I want to write to a file EXACTLY "HELLO" Console.WriteLine(" "Hello" ") se the problem with the "'s. How do i get around this Link to comment https://www.neowin.net/forum/topic/899656-simple-vbnet-question/ Share on other sites More sharing options...
0 code_ninja Posted May 9, 2010 Share Posted May 9, 2010 :blink: Link to comment https://www.neowin.net/forum/topic/899656-simple-vbnet-question/#findComment-592603398 Share on other sites More sharing options...
0 Andre S. Veteran Posted May 9, 2010 Veteran Share Posted May 9, 2010 @dramonai: that doesn't work in VB. For double-quotes, you write double-double quotes: Console.WriteLine("""Hello!""") EDIT: alternatively: Console.WriteLine(ControlChars.Quote + "Hello" + ControlChars.Quote) Link to comment https://www.neowin.net/forum/topic/899656-simple-vbnet-question/#findComment-592603416 Share on other sites More sharing options...
0 NotSoSmartGuy Posted May 9, 2010 Author Share Posted May 9, 2010 hmmm not getting that to work Link to comment https://www.neowin.net/forum/topic/899656-simple-vbnet-question/#findComment-592603418 Share on other sites More sharing options...
0 AnthonySterling Posted May 9, 2010 Share Posted May 9, 2010 What is going on with the multiple quotes? :p Console.WriteLine("HELLO") This won't however, write to a file. Link to comment https://www.neowin.net/forum/topic/899656-simple-vbnet-question/#findComment-592603434 Share on other sites More sharing options...
0 Andre S. Veteran Posted May 9, 2010 Veteran Share Posted May 9, 2010 What is going on with the multiple quotes? :pI think he wants to know how to print the quotes themselves. Link to comment https://www.neowin.net/forum/topic/899656-simple-vbnet-question/#findComment-592603438 Share on other sites More sharing options...
0 NotSoSmartGuy Posted May 9, 2010 Author Share Posted May 9, 2010 got it ty Link to comment https://www.neowin.net/forum/topic/899656-simple-vbnet-question/#findComment-592603468 Share on other sites More sharing options...
0 Dav-id Posted May 9, 2010 Share Posted May 9, 2010 can you use escape characters in VB.NET? Console.WriteLine("\"Hello\"") Link to comment https://www.neowin.net/forum/topic/899656-simple-vbnet-question/#findComment-592603476 Share on other sites More sharing options...
0 Andre S. Veteran Posted May 9, 2010 Veteran Share Posted May 9, 2010 can you use escape characters in VB.NET? Console.WriteLine("\"Hello\"") No. Escape characters are members of ControlChars in VB as I illustrated. Link to comment https://www.neowin.net/forum/topic/899656-simple-vbnet-question/#findComment-592603578 Share on other sites More sharing options...
Question
NotSoSmartGuy
I want to write to a file EXACTLY "HELLO"
Console.WriteLine(" "Hello" ")
se the problem with the "'s. How do i get around this
Link to comment
https://www.neowin.net/forum/topic/899656-simple-vbnet-question/Share on other sites
8 answers to this question
Recommended Posts