Maurice Breuning: Colanth is spot-on as usual, but didn't say why it's that way. Unlike many other programming languages, quotes in Visual Basic aren't escaped by a backslash, but by another set of quotes. So you have one set of quotes to start the string literal, two sets of quotes to embed a quotation mark in the string literal (the first set escapes the second set), two more sets of quotes at the end of the string literal for the same purpose, immediately followed by another set of quotes to close the string literal.I have to deal with Visual Basic in one form or another nearly every day, and this is one of the more annoying "features" of the language. Just imagine trying to write out large comma-delimited files where every value is wrapped in quotes (to ensure that it works well in a mail merge)--it quickly gets confusing which quotes are doing what, and hunting down misplaced quotes is no barrel of monkeys....Show more
Tereasa Sorensen: Code.Text = Code.Text & ! "My name is, ""James"""1 for the first, 2 for the second, 3 for the third.
Jill Thomer: how do I output quotations in the code?I know in java it is,("My name is, ""James""");but what is the way here?in this case I am doing:Code.Text = Code.Text & (Insert Quotations here)...Show more
Tom Romer: not had to shop James right into a string. you additionally could hire your TextBox to output the result. as an occasion: RichTextBox = "hi, my call is " & TextBox Am I answering your question?
No comments:
Post a Comment