Mix of C# and VB code examples in xml

Topics: Developer Forum
Jul 21, 2010 at 3:37 PM
Hello, For a class we are attempting to have both a VB and a C# code example such as: /// <summary> /// The summary for the class /// </summary> /// <example> /// /// VB Code example.... /// /// /// C# Code example /// /// </example> When we build the outputed help documentation, it is treating both examples as C#. Our source code is C#. I have tried putting [VB] at the top of the code with no effect. Microsoft has code examples in multiple languages throughout their documentation. Is it possible to achieve this with Sandcastle? Thanks, Peter
Jul 21, 2010 at 3:45 PM
Edited Jul 21, 2010 at 3:47 PM

I solved my own problem! No where on the internet is this described that I could find.. but the following syntax works!

<code language="VB"> VB Code </code>
<code language="C#"> C# Code </code>
Coordinator
Jul 21, 2010 at 6:02 PM

This is noted in the help file in the topic for the Code Block Component.  See it for all the extended attributes that it supports.

Eric