GIDForums  

Go Back   GIDForums > Computer Programming Forums > .NET Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 11-Jan-2007, 01:44
Menol_LK's Avatar
Menol_LK Menol_LK is offline
Junior Member
 
Join Date: Sep 2006
Location: Sri Lanka
Posts: 29
Menol_LK is on a distinguished road
Question

How to add small descriptions to Functions



Hi Friends,

I want to add descriptions to functions that I write (specially in the common classes to be used by other programmers).

What I mean by this is ...

when we are using an .Net function, or a sub proc. it displays a small description
(in that small yellow colored box)
which describes the usage

for ex/
if we use something.ToString(), a description saying "Converts to String ....
..." in a small yellow colored box
and also it describes each parameter whereas in a normal function creation, only the parameter type is displayed in that yellow box.


I know this can be done But I just dont know how... !

Please Help Me.

-- Menol --
  #2  
Old 19-Jan-2007, 03:42
erniegerdie erniegerdie is offline
Junior Member
 
Join Date: Feb 2004
Location: England
Posts: 84
erniegerdie has a spectacular aura abouterniegerdie has a spectacular aura about

Re: How to add small descriptions to Functions


Quote:
Originally Posted by Menol_LK

Hi Friends,

I want to add descriptions to functions that I write (specially in the common classes to be used by other programmers).

What I mean by this is ...

when we are using an .Net function, or a sub proc. it displays a small description
(in that small yellow colored box)
which describes the usage

for ex/
if we use something.ToString(), a description saying "Converts to String ....
..." in a small yellow colored box
and also it describes each parameter whereas in a normal function creation, only the parameter type is displayed in that yellow box.


I know this can be done But I just dont know how... !

Please Help Me.

-- Menol --

Type three forward slashes '///' just above your method.
The Visual Studio IDE will then insert a a comment header to your method, you can then type in the descriptions for the parameters and the methods.

i.e

C-SHARP / C# Code:
        /// <summary>
        /// -->> Enter your comments here <---
        /// </summary>
        /// <param name="state">--> You can also enter descriptions for the parameters <-- </param>
        private void HarvestDeadThreads(object state)
        ....

Now when you however over calls to the method you should see the summary.

If your interested there is also a tool called GhostDoc which you can use to assist in creating your own pre-defined generic descriptions for method summaries, which is determined by the names of names and the parameters.

You can get it here:
http://www.roland-weigelt.de/ghostdoc/

Enjoy
  #3  
Old 19-Jan-2007, 05:24
Menol_LK's Avatar
Menol_LK Menol_LK is offline
Junior Member
 
Join Date: Sep 2006
Location: Sri Lanka
Posts: 29
Menol_LK is on a distinguished road

Re: How to add small descriptions to Functions



Friend,

Thnx a lot,
and do you know a way to achive this in VB.NET.

Thanks again!


-- Menol --

 
 

Recent GIDBlogPython ebook by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows C++ Problem with Class and Functions Alloishus C++ Forum 3 28-Sep-2006 19:34
friend functions error CaptnB C++ Forum 2 12-Jun-2006 14:39
Re: Using APC functions in your PHP scripts admin MySQL / PHP Forum 0 12-May-2006 00:43
Please help with functions... brookeville C++ Forum 36 05-Nov-2004 01:23
conflict between printf and stdarg.h va functions mirizar C Programming Language 3 12-Jul-2004 09:11

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 01:39.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.