0

When adding an inline comment to VB.NET code, the following lines are colored as strings:

dim a as integer
a += 1 'And here is the comment which turns the next line(s) into strings.
dim b as integer = a * 2
5
  • for some reason, the behaviour i'm describing was evident while writing the bug report, but not when viewing it. To see it on a posted question, go to stackoverflow.com/questions/5109302/… Commented Feb 24, 2011 at 21:36
  • Use two quotes '' in your snippet to avoid this. Commented Feb 24, 2011 at 22:01
  • Hans - are you following me around and answering my questions ? :-) Yes, the two quotes helped! Commented Feb 24, 2011 at 22:17
  • This is a duplicate...I'm just too lazy to look it up right now. And yes, it's the ', just add a closing one after the comment. Commented Feb 24, 2011 at 22:26
  • 1
    Duplicate and duplicate feature request Commented Apr 18, 2011 at 10:16

1 Answer 1

2

As long as your question is correctly tagged it should be fine in the final question.

The preview will show a more generically rendered code preview, so don't hold that as gospel.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.