473,508 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

/// <example>

Where will code that is preceded with:

/// <example>
/// some comments
/// </example>

actually show up?

I can see my <summaryand <remarkscode showing up in the code comment
pages and in the Object Browser, but where will the example come into play?
Sep 21 '06 #1
8 1877
On Wed, 20 Sep 2006 21:36:32 -0400, Scott M. wrote:
Where will code that is preceded with:

/// <example>
/// some comments
/// </example>

actually show up?

I can see my <summaryand <remarkscode showing up in the code comment
pages and in the Object Browser, but where will the example come into play?
Document generation tools such as NDoc will include data there in the help
files that they generate. See
http://ndoc.sourceforge.net/content/tag_example.htm for an example.
--
Tom Porterfield
Sep 21 '06 #2
Ok, but is there no use for it in VS.NET?
"Tom Porterfield" <tp******@mvps.orgwrote in message
news:15****************@tpportermvps.org...
On Wed, 20 Sep 2006 21:36:32 -0400, Scott M. wrote:
>Where will code that is preceded with:

/// <example>
/// some comments
/// </example>

actually show up?

I can see my <summaryand <remarkscode showing up in the code comment
pages and in the Object Browser, but where will the example come into
play?

Document generation tools such as NDoc will include data there in the help
files that they generate. See
http://ndoc.sourceforge.net/content/tag_example.htm for an example.
--
Tom Porterfield

Sep 21 '06 #3
"Scott M." <No****@NoSpam.coma écrit dans le message de news:
er**************@TK2MSFTNGP05.phx.gbl...

| Ok, but is there no use for it in VS.NET?

/// <summary>
/// generic property class
/// </summary>
/// <typeparam name="valueT">the type of the value held in the
Property</typeparam>
public class Property<valueT>
{
...
}

The above comment shows a code insight hint showing the typeparam text, when
typing Property<... into a field or other member.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer
Sep 21 '06 #4
Ok, but is there no use for it in VS.NET?

Not directly. AFAIK, VS .NET only uses the following tags in
IntelliSense or Object Browser:
<summary>
<param>
<typeparam>
<returns>
<value>

Other tags are used for generating documentation. The <exampletag
creates Example section in generated documentation, as you can see for
example at http://tinyurl.com/mazqb. So there is indirect use of it if
you generate documentation. User then can point to the function, press
F1 and get descriptive help topic including example.

--
Peter Macej
Helixoft - http://www.helixoft.com
VSdocman - Commenter and generator of class documentation for C#, VB
..NET and ASP .NET code
Sep 21 '06 #5
Yes, but my question was not about <typeparam>, it was about <example>.
"Joanna Carter [TeamB]" <jo****@not.for.spamwrote in message
news:uo**************@TK2MSFTNGP03.phx.gbl...
"Scott M." <No****@NoSpam.coma écrit dans le message de news:
er**************@TK2MSFTNGP05.phx.gbl...

| Ok, but is there no use for it in VS.NET?

/// <summary>
/// generic property class
/// </summary>
/// <typeparam name="valueT">the type of the value held in the
Property</typeparam>
public class Property<valueT>
{
...
}

The above comment shows a code insight hint showing the typeparam text,
when
typing Property<... into a field or other member.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer


Sep 21 '06 #6
Well, actually it does not create anything in the code comment pages
generated by VS.NET. Summary and Remarks will show up there, but not
description.

FYI, the link you provided redirects to
http://msdn2.microsoft.com/en-us/library/t97s7bs3.aspx, which an article
about the String.Trim() method.
"Peter Macej" <pe***@helixoft.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>Ok, but is there no use for it in VS.NET?

Not directly. AFAIK, VS .NET only uses the following tags in IntelliSense
or Object Browser:
<summary>
<param>
<typeparam>
<returns>
<value>

Other tags are used for generating documentation. The <exampletag
creates Example section in generated documentation, as you can see for
example at http://tinyurl.com/mazqb. So there is indirect use of it if you
generate documentation. User then can point to the function, press F1 and
get descriptive help topic including example.

--
Peter Macej
Helixoft - http://www.helixoft.com
VSdocman - Commenter and generator of class documentation for C#, VB .NET
and ASP .NET code

Sep 21 '06 #7
Well, actually it does not create anything in the code comment pages
generated by VS.NET. Summary and Remarks will show up there, but not
description.
VS .NET cannot generate MSDN like documentation. You need to use some
tool for this, for example our VSdocman.
FYI, the link you provided redirects to
http://msdn2.microsoft.com/en-us/library/t97s7bs3.aspx, which an article
about the String.Trim() method.
That's correct. I posted this link as random example of how it looks
like. This article contains "Example" section with the code showing how
to use it. When you use Trim method in your code and press F1, you'll
get this MSDN topic.

If you use <exampletag in your own method, you can do the same. You
can generate MSDN documentation for it (using 3rd party tool) which will
contain "Example" section with your code samples.

If you have for example property prop1 with the following comment (not
complete here):
/// <summary>Our sample property.</summary>
/// <remarks>
/// This property is really interesting.
/// </remarks>
/// <value>Some nice text.</value>
/// <example>This is an example how to use it:
/// <para></para>
/// <code>try
/// {
/// if (this.prop1 != @&quot;hello&quot;)
/// {
/// return SampleEnum.value2;
/// }
/// else
/// {
/// return SampleEnum.value3;
/// }
/// }
/// catch (Exception ex)
/// {
/// return SampleEnum.value1;
/// }</code></example>
/// <author>Peter Macej</author>
/// <version>2.0</version>
/// <revision>27</revision>
/// <copyright>(c) 2006 Helixoft</copyright>
/// <todo>Improve exception handling</todo>
/// <seealso cref="TestDLL.DllClass1.prop2">
/// Another property
/// </seealso>
public string prop1

then our VSdocman generates the help page for it available at
http://tinyurl.com/r86vf.

--
Peter Macej
Helixoft - http://www.helixoft.com
VSdocman - Commenter and generator of class documentation for C#, VB
..NET and ASP .NET code
Sep 22 '06 #8
Thanks, but you missed the point of my question. I wanted to know what
<examplebuys me in VS.NET (not a 3rd party documentation tool). You
replied that it helps with generated documentation. The only generated
documentation in VS.NET is Code Comment Pages.
"Peter Macej" <pe***@helixoft.comwrote in message
news:O$**************@TK2MSFTNGP05.phx.gbl...
>Well, actually it does not create anything in the code comment pages
generated by VS.NET. Summary and Remarks will show up there, but not
description.

VS .NET cannot generate MSDN like documentation. You need to use some tool
for this, for example our VSdocman.
>FYI, the link you provided redirects to
http://msdn2.microsoft.com/en-us/library/t97s7bs3.aspx, which an article
about the String.Trim() method.

That's correct. I posted this link as random example of how it looks like.
This article contains "Example" section with the code showing how to use
it. When you use Trim method in your code and press F1, you'll get this
MSDN topic.

If you use <exampletag in your own method, you can do the same. You can
generate MSDN documentation for it (using 3rd party tool) which will
contain "Example" section with your code samples.

If you have for example property prop1 with the following comment (not
complete here):
/// <summary>Our sample property.</summary>
/// <remarks>
/// This property is really interesting.
/// </remarks>
/// <value>Some nice text.</value>
/// <example>This is an example how to use it:
/// <para></para>
/// <code>try
/// {
/// if (this.prop1 != @&quot;hello&quot;)
/// {
/// return SampleEnum.value2;
/// }
/// else
/// {
/// return SampleEnum.value3;
/// }
/// }
/// catch (Exception ex)
/// {
/// return SampleEnum.value1;
/// }</code></example>
/// <author>Peter Macej</author>
/// <version>2.0</version>
/// <revision>27</revision>
/// <copyright>(c) 2006 Helixoft</copyright>
/// <todo>Improve exception handling</todo>
/// <seealso cref="TestDLL.DllClass1.prop2">
/// Another property
/// </seealso>
public string prop1

then our VSdocman generates the help page for it available at
http://tinyurl.com/r86vf.

--
Peter Macej
Helixoft - http://www.helixoft.com
VSdocman - Commenter and generator of class documentation for C#, VB .NET
and ASP .NET code

Sep 22 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2944
by: Francesco Moi | last post by:
Hello. I'm trying to build a RSS feed for my website. It starts: ----------------//--------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE rss PUBLIC "-//Netscape...
1
6794
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document domDocument; Element domElement; // Root tag
4
62086
by: higabe | last post by:
Three questions 1) I have a string function that works perfectly but according to W3C.org web site is syntactically flawed because it contains the characters </ in sequence. So how am I...
129
64455
by: Torbjørn Pettersen | last post by:
I've started cleaning up my HTML and implementing CSS. So far I've used FrontPage, but am switching over to DreamWeaver. Reading a bit on W3Schools.com and W3.org I see there are a lot of HTML...
8
6870
by: Michael | last post by:
This is a two-part question to which I haven't been able to find an answer anywhere else. 1. Is it possible to format the bullet/number character of the <li>? In my styles sheet, I have the <li>...
11
13657
by: Les Paul | last post by:
I'm trying to design an HTML page that can edit itself. In essence, it's just like a Wiki page, but my own very simple version. It's a page full of plain old HTML content, and then at the bottom,...
3
2155
by: Jesper Odgaard | last post by:
Hi, When documenting my code using comment web pages from the visual studio .Net 2002 ide, it seems that it ignores the <example> tag. Except for this tag everything works fine. Can I customize...
0
1109
by: bcg | last post by:
I have a couple of places where I used the following text in my code, but the example and code text does not show up in the resultant comment web pages...why? The summary and parameter information...
1
1635
by: John Mark Howell | last post by:
When using the example straight out of the MSDN and using the Visual Studio 2003's Build Comment Web Pages, you will not see the <example> section. It is in the generated XML file but I do not see...
0
7129
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7333
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
428
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.