473,946 Members | 2,734 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with Intellisense and Commenting Code

In Microsofts Application blocks they comment the code directly in front of the Sub or Function, (an example is below).

These commented lines allow the programmer to see the comments and parameters when using that sub/function.

I've tried to do this and I can't get it to work (see my code below). Does anyone have any ideas or know of any
white papers?

Microsofts code

' This method opens (if necessary) and assigns a connection, transaction, command type and parameters
' to the provided command.
' Parameters:
' -command - the OleDbCommand to be prepared
' -connection - a valid OleDbConnection , on which to execute this command
' -transaction - a valid OleDbTransactio n, or ' null'
' -commandType - the CommandType (stored procedure, text, etc.)
' -commandText - the stored procedure name or T-SQL command
' -commandParamete rs - an array of SqlParameters to be associated with the command or ' null' if no parameters are required
Private Shared Sub PrepareCommand( ByVal command As OleDbCommand, _
ByVal connection As OleDbConnection , _
ByVal transaction As OleDbTransactio n, _
ByVal commandType As CommandType, _
ByVal commandText As String, _
ByVal commandParamete rs() As OleDbParameter, ByRef mustCloseConnec tion As Boolean)
My Code

' Executes a Table Search against the table using the provided paramters
' e.g.:
' dim pESADataSet as Core.ISet = oESA.GetData()
' Parameters:
' -WhereClause - A string indicating what the IQueryFilter.Wh ereClause will be set to
' Returns: A Core.ISet containing the results from the table search
Public Overridable Overloads Function GetData(Optiona l ByVal WhereClause As String = Nothing) As Core.ISet

Nov 20 '05 #1
3 1395
I don't understand your question.

What exactly are you having problems with

The only thing I noticed is that the IDE wants an "end function" on your
GetData function.

What exactly can't you get to work?

Shawn Shelton

JimG wrote:
In Microsofts Application blocks they comment the code directly in front of the Sub or Function, (an example is below).

These commented lines allow the programmer to see the comments and parameters when using that sub/function.

I've tried to do this and I can't get it to work (see my code below). Does anyone have any ideas or know of any
white papers?

Microsofts code

' This method opens (if necessary) and assigns a connection, transaction, command type and parameters
' to the provided command.
' Parameters:
' -command - the OleDbCommand to be prepared
' -connection - a valid OleDbConnection , on which to execute this command
' -transaction - a valid OleDbTransactio n, or ' null'
' -commandType - the CommandType (stored procedure, text, etc.)
' -commandText - the stored procedure name or T-SQL command
' -commandParamete rs - an array of SqlParameters to be associated with the command or ' null' if no parameters are required
Private Shared Sub PrepareCommand( ByVal command As OleDbCommand, _
ByVal connection As OleDbConnection , _
ByVal transaction As OleDbTransactio n, _
ByVal commandType As CommandType, _
ByVal commandText As String, _
ByVal commandParamete rs() As OleDbParameter, ByRef mustCloseConnec tion As Boolean)
My Code

' Executes a Table Search against the table using the provided paramters
' e.g.:
' dim pESADataSet as Core.ISet = oESA.GetData()
' Parameters:
' -WhereClause - A string indicating what the IQueryFilter.Wh ereClause will be set to
' Returns: A Core.ISet containing the results from the table search
Public Overridable Overloads Function GetData(Optiona l ByVal WhereClause As String = Nothing) As Core.ISet


Nov 20 '05 #2
On Fri, 7 Nov 2003 09:31:13 -0800, JimG wrote:
In Microsofts Application blocks they comment the code directly in front of the Sub or Function, (an example is below).

These commented lines allow the programmer to see the comments and parameters when using that sub/function.

VB Doesn't directly support comments for intellisense like C# does. There
is an add in available that permits this.

Check this link out for the VB.Net Power Toys which includes this add-in:

http://www.gotdotnet.com/team/ide/

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #3
* "=?Utf-8?B?SmltRw==?=" <ji*********@ho tmail.com> scripsit:
In Microsofts Application blocks they comment the code directly in front of the Sub or Function, (an example is below).

These commented lines allow the programmer to see the comments and parameters when using that sub/function.


My XML Comments FAQ:

VB Commenter
<http://www.gotdotnet.c om/team/ide/>
-> section "VB Commenter"

XML Documentation
<http://www.gotdotnet.c om/team/vb/>
-> section "XML Documentation"

VBXC - VB.NET XML Commentor
<http://vbxmldoc.tor-erik.net/index.shtml>

NDOC (formerly DOC.NET)
<http://ndoc.sourceforg e.net/>

VB.DOC
<http://vb-doc.sourceforge .net/>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

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

Similar topics

4
1481
by: Scott C. Reynolds | last post by:
Hi. I have created a templated control, and I want to know how i can set it up so that the projects consuming it will have all the same intellisense benefits of using any other server control. It will be used by multiple projects.
5
2286
by: Tia Carr | last post by:
When I press F1 on Date, all I get is two paragraphs on the Date date type. The intellisense feature indicates there are a few dozen methods and properties associated with Date. Where can I get the online help for that? Is it not documented? I have the 2002 version of .NET. Does the 2003 version provide more complete documentation? I also search for msdn online, but of no success. The is a learning process for me to learn the online...
10
1243
by: Mythran | last post by:
I wrote the XML file for a VB.Net assembly which *should* work in my opinion. How do I get this xml file to work so my assembly has the Intellisense features which C# has built in? (code commenting automatically makes these XML files, how to make my xml files link into the XML as the C# files which are autogenerated link).. Thanks, Mythran
2
1405
by: Mythran | last post by:
I have asked this question here before but was given an answer I didn't like (stubborn I am!). I believe the way my question was interpreted was not as I had hoped...so I am trying again. In C#, code commenting with Intellisense is used. In VB.Net, it's not. Fine, dandy, but not what I am looking for. I just want to write the XML by hand and use it in my library so it displays the intellisense itself, not through code comments <--...
5
2243
by: Nmx | last post by:
Hi everyone, I'm writing a patch to a search engine (aspseek http://www.aspseek.org/) compile under gcc 3.4.4 on FC3. At some point, I found this piece of code: -- // Dirty hack to avoid non-threadsafeness of string class // We set ref to big value here so it will not reach 0
16
2837
by: Rex | last post by:
Hi All - I have a question that I think MIGHT be of interest to a number of us developers. I am somewhat new to VIsual Studio 2005 but not new to VB. I am looking for ideas about quick and efficient navigating within Visual Studio 2005. Let's say your project (or solution) has dozens of forms and hundreds or even thousands of routines. Two Questions: 1) BUILT-IN to Visual Studio 2005. What ideas do you have to quickly
100
4811
by: Angel Tsankov | last post by:
Can someone recommend a good source of C/C++ coding style. Specifically, I am interested in commenting style and in particular how to indent comments and the commented code, rather than when to use comments. Thanks in advance! -- http://www.gotw.ca/resources/clcm.htm for info about ]
5
3264
by: wal | last post by:
Hello, I'm using __declspec(property) to access get/set methods as properties (like in C# and VB.NET). Now, the problem is that both the property name and the get/set methods show in the intellisense list. Is there anyway to remove the names of the get/set methods from the intellisense list? Here's an example, I have two methods, one is a get method with the name getText and another set method with the name setText, the name of the...
1
1958
by: Infog | last post by:
I have read that it is possible, but how do I use them in VS2008? I would like to start commenting class's commands and properties, but I can't find how to. http://social.msdn.microsoft.com/forums/en-US/vbide/thread/9381d88e-159e-49d4-ac54-bde51a6ef62f
0
9974
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
11140
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...
1
11320
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10679
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8240
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7402
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
6095
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...
2
4523
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3524
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.