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 OleDbTransaction, or ' null'
' -commandType - the CommandType (stored procedure, text, etc.)
' -commandText - the stored procedure name or T-SQL command
' -commandParameters - 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 OleDbTransaction, _
ByVal commandType As CommandType, _
ByVal commandText As String, _
ByVal commandParameters() As OleDbParameter, ByRef mustCloseConnection 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.WhereClause will be set to
' Returns: A Core.ISet containing the results from the table search
Public Overridable Overloads Function GetData(Optional ByVal WhereClause As String = Nothing) As Core.ISet