473,653 Members | 3,000 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 1884
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******** ********@tpport ermvps.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">t he 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******** ******@TK2MSFTN GP03.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">t he 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******** ********@TK2MSF TNGP03.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&qu ot;)
/// {
/// return SampleEnum.valu e2;
/// }
/// else
/// {
/// return SampleEnum.valu e3;
/// }
/// }
/// catch (Exception ex)
/// {
/// return SampleEnum.valu e1;
/// }</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.D llClass1.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$******** ******@TK2MSFTN GP05.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&qu ot;)
/// {
/// return SampleEnum.valu e2;
/// }
/// else
/// {
/// return SampleEnum.valu e3;
/// }
/// }
/// catch (Exception ex)
/// {
/// return SampleEnum.valu e1;
/// }</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.D llClass1.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
2955
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 Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd"> <rss version="0.91"> ----------------//----------------------
1
6819
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document domDocument; Element domElement; // Root tag
4
62095
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 supposed to write this function? String.replace(/</g,'&lt;');
129
64542
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 code I never even knew existed. Among these are <em> and <strong>. What's the difference between these two and <i> and <b>? -- Torbjørn Pettersen Editor/Webmaster
8
6879
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> tag formatted, for example, bold. However, when it's applied, the number of the <li> is not bold, but the text is. Do I have to apply the bold to the <ol> instead? 2. When I use <li>example text</li>, and when I insert a <br> after the </li>,...
11
13687
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, there's an "Edit" link. So the page itself looks something like this: <HTML><HEAD><TITLE>blah</TITLE></HEAD><BODY> <!-- TEXT STARTS HERE --> <H1>Hello World!</H1> <P>More stuff here...</P>
3
2162
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 the web pages to include examples? brgds Jesper. /// <summary>
0
1113
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 show fine. /// <summary> /// Summary information /// </summary> /// <example> The is an example. /// <code>
1
1648
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 it in the VS window. Does anyone know how to get that to show up? A second question is where is the XSL and CSS that VS is using to display the XML? Try the following example straight from the MSDN help: /// <summary>
0
8283
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8811
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8704
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7302
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5620
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4147
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2707
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 we have to send another system
1
1914
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1591
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.