embedding an image as comment is sourcecode

  • Thread starter Thread starter Sagaert Johan
  • Start date Start date
S

Sagaert Johan

Hi

Textual comment is not always possible to explain something in source so i
wonder if it is possible to embed images into sourcecode te serve as visual
comment.

(Might be a next VS feature ? )

Johan
 
You can insert a link to picture. For example create the following comment:

/// <summary>
/// See the following picture:
/// file:\\C:\MyProject\Pictures\picture1.gif
/// </summary>

Then you can CTRL+click to open the image directly when viewing source code.
Or if you want to include the picture also in documentation generated
from your XML comments, you can use e.g. our VSdocman tool. It supports
<img> XML comment tag for inserting images
(http://www.helixoft.com/images/stories/vsdocman/help/aimgxml.htm).
 
Textual comment is not always possible to explain something in source so i
wonder if it is possible to embed images into sourcecode te serve as
visual comment.

(Might be a next VS feature ? )

No, and it will never happen. Source code is stored in text files, and text
files, by definition, cannot contain images. This has nothing to do with
whether or not Visual Studio could handle such a thing. (Obviously it
COULD.) This has to do with the fact that you can theoretically write your
code in any text editor and pass it on to the compiler.
 
rossum said:
-snip-
As Jeff has pointed out, source code files are text, so cannot contain
images. The best you can do is probably ASCII Art:

No, all that is required is that VS interpret comments -- given that,
they could do it one of two ways (base64 encoded image, or some kind of
link).

THey probably won't do this, either now or in any future version, but
they could.
 
Back
Top