|
 |
| Note:
This uses the internal blog search engine. The Google search engine is also available at the top of the page. |
|
|
 |
|
|
|
|
 |
Please review the site disclaimer before downloading or using content found on this site
|
|
|
 |
|
|
|
|
|
 |
As always, I welcome your comments!
|
Author:
|
Steve Gray
|
Created:
|
4/12/2009 1:46 PM
|
|
|
Tricks and Tips on VB.NET
|
By Steve Gray on
5/26/2011 12:44 PM
When you create a web site in ASP.NET the form tag is included for you. This issue is magnified if you use master pages (who doesn’t?). The issue is that the code that you get from PayPal has a <form> tag in it, and you can’t nest form tags. So your code doesn’t post correctly when the user clicks ‘Buy Now’. Here’s a real easy way around that. There are two ways you can do this, as a link from the <HTML> code, or as a Response.Redirect from the code behind. The link will be less work, but also less flexible. From the HTML, code something like this: - <a href="https://www.paypal.com/cgi-bin/webscr
- ?cmd=_xclick&business=YOUR-PAYPAL-EMAIL-HERE
- &item_name=Widget
- &amount=29.00
- &undefined_quantity=1
- ¤cy_code=USD">
- <img src="http://www.paypal.com/en_US/i/btn/x-click-but23.gif"
- border="0" alt="Buy Now Using PayPal" />
- </a>
If you’ll compare the above to the code that you got from PayPal, you’ll see that we converted the <input> tags to be parameters in the query string. From the code behind it looks like this: - Protected Sub btnSubscribeYear_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubscribeYear.Click
- Dim dblAmount As Double
- dblAmount = Me.txtAmount.text
-
- https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amount=" & dblAmount & "&hosted_button_id=3IMNOTREAL3E3
- End Sub
Here’s a list of all the arguments (not guaranteed to be complete or correct, you’ll want to check with PayPal for complete information) Argument Description business Email address associated with seller's PayPal account quantity Quantity of items being sold undefined_quantity Allows user to edit quantity item_name Name of item item_number Optional item number amount Price of each item (without currency symbol) undefined_amount Allows user to edit the amount (good for donations) shipping Price of shipping currency_code Code for type of currency (Default appears to be USD) first_name Customer's first name last_name Customer's last name address1 Customer's first address line address2 Customer's second address line city Customer's city state Customer's state zip Customer's zip code email Customer's email address night_phone_a Customers telephone area code night_phone_b Customers telephone prefix night_phone_c Remainder of customer's telephone number
|
By Steve Gray on
5/24/2011 1:42 PM
This piece of code will show how to serialize a DataTable to a string, where it can be saved to disk, and then how to read that string back into a DataTable again. Actually, we’ll have to use a DataSet to read the string (in XML format) back in, if you use a DataTable you’ll get: DataTable does not support schema inference from Xml Oddly, the DataSet works just fine There are code comments for each line below, you should not have any trouble with it. - Imports System.IO
- Imports System.Xml
-
- Module Module1
-
- Sub Main()
- 'declare a datatable and populate it with data. Here, we call a
- 'subroutine that loads invoices from a text file.
- Dim oDT As DataTable = getAPInvoices("Data.txt")
-
- 'declare a stringWriter and an XmlTextWriter
- Dim sw As New StringWriter
- Dim tw As New XmlTextWriter(sw)
- 'give the table a name. This name will become the name of each row in the XML file
- oDT.TableName = "invoice"
-
- 'make the XML pretty
- tw.Formatting = Formatting.Indented
-
- 'write to the XmlTextWriter/StringWriter
- oDT.WriteXml(tw)
-
- 'view the results
- MsgBox(sw.ToString)
-
- 'declare a new DataSet. Note that we're not using a DataTable... you'll get
- 'an error if you do:
- 'DataTable does not support schema inference from Xml
- Dim oDSNew As New DataSet
-
- 'declare a StringReader, populate it with our XML String
- Dim sr As New StringReader(sw.ToString)
-
- 'read in the XML into our DataSet
- oDSNew.ReadXml(sr)
-
- 'loop through it to prove it worked.
- For Each oRow As DataRow In oDSNew.Tables(0).Rows
- Console.WriteLine(oRow("vchnumwk"))
- Next
- End Sub
|
By Steve Gray on
5/23/2011 12:43 PM
This piece of code shows how to embed an image into an email using the System.Net.Mail namespace - Try
- Dim strServer As String = strMailServer
-
- Dim mail As New System.Net.Mail.MailMessage(strFrom, strTo)
-
- For Each cc In strCC.Split(";")
- If cc > "" Then
- mail.CC.Add(cc)
- End If
- Next
-
- For Each bcc As String In strBCC.Split(";")
- If bcc > "" Then
- mail.Bcc.Add(bcc)
- End If
- Next
-
- Dim htmlView As Net.Mail.AlternateView = Net.Mail.AlternateView.CreateAlternateViewFromString("Here is the image... <img src=cid:myImage>", Nothing, "text/html")
-
- Dim oImage As New Net.Mail.LinkedResource(strFilename)
- oImage.ContentId = "myImage"
- htmlView.LinkedResources.Add(oImage)
-
- mail.Subject = strSubject
- mail.Body = strBody
- mail.Priority = intPriority
- mail.AlternateViews.Add(htmlView)
-
- Dim serv As New System.Net.Mail.SmtpClient(strServer)
-
- serv.Send(mail)
-
- Catch ex As Exception
- Throw New Exception(ex.Message)
- End Try
|
By Steve Gray on
3/22/2011 5:55 PM
Recently I needed to concatenate two strings and form a URI. I had the base stored in the site config; then we needed to add the page onto that. I wanted to be sure that I didn’t have errors if the user added or didn’t add ‘/’ to the URI in the config so I started with Path.combine. <smiles> That worked (sort of) but it used the wrong ‘/’ and it generated an error. Enter URI.TriCreate. According to the documentation this would do the trick. But the documentation didn’t have any examples; and I couldn’t figure out the syntax. How bad is the documentation if you read all the way through it and still don’t have a clue? At any rate, I searched on line for a while and put it all together. Here are code sample for the three overloads. A few definitions so that you don’t have the same issues that I did: - URI: Uniform Resource Identifier. A string of characters used to identify a name or a resource on the Internet.
- UriKind: URIs can be Absolute or Relative. “www.devshed.us” is Absolute. “/links.aspx” is relative.
Code Snippet - Module Module1
-
- Sub Main()
- TryCreate1()
- TryCreate2()
- TryCreate3()
- End Sub
-
- Sub TryCreate1()
- 'demonstrates Uri.TriCreate(Uri,String,Uri)
- Dim UriIn As Uri = New Uri("http://devshed.us/")
- Dim strPage As String = "/links.aspx"
- Dim UriOut As Uri = Nothing
-
- If Uri.TryCreate(UriIn, strPage, UriOut) Then
- Debug.Print(UriOut.ToString)
- Else
- Throw New Exception("Invalid URI")
- End If
- End Sub
- Sub TryCreate2()
- 'demonstrates Uri.TriCreate(String,Urikind, Uri)
- 'this form doesn't create anything. It just tells us if the URI that we're passing
- 'in the first parameter is Relative or Absolute. Or valid at in any form
-
- 'test to see if this string is a valid URI
- Dim strUrl As String = "http://devshed.us/"
-
- 'placeholder for our output
- Dim UriOut As Uri = Nothing
-
- 'see if our input qualifies as an Absolute URI
- If Uri.TryCreate(strUrl, UriKind.Absolute, UriOut) Then
- 'yes
- Debug.Print(UriOut.ToString & " is absolute")
- Else
- 'no
- Debug.Print(strUrl & " is not absolute")
- End If
-
- 'see if our input qualifies as a Relative URI
- If Uri.TryCreate(strUrl, UriKind.Relative, UriOut) Then
- 'yes
- Debug.Print(UriOut.ToString & " is Relative")
- Else
- 'no
- Debug.Print(strUrl & " is not Relative")
- End If
-
- 'same as above, but this time with a string that is Relative
- strUrl = "/index.aspx"
- If Uri.TryCreate(strUrl, UriKind.Absolute, UriOut) Then
- Debug.Print(UriOut.ToString & " is absolute")
- Else
- Debug.Print(strUrl & " is not absolute")
- End If
-
- If Uri.TryCreate(strUrl, UriKind.Relative, UriOut) Then
- Debug.Print(UriOut.ToString & " is Relative")
- Else
- Debug.Print(strUrl & " is not Relative")
- End If
- End Sub
- Sub TryCreate3()
- 'demonstrates Uri.TriCreate(Uri,Uri,Uri)
- 'concatonates the first two URIs into the third
-
- 'get a base uri
- Dim BaseUri As Uri = New Uri("http://devshed.us/")
-
- 'note that we have to specify the urikind
- Dim RelativeUri As New Uri("/links.aspx", UriKind.Relative)
-
- 'placeholder for the return val
- Dim UriOut As Uri = Nothing
-
- 'add the two together
- If Uri.TryCreate(BaseUri, RelativeUri, UriOut) Then
- Debug.Print(UriOut.ToString)
- Else
- Throw New Exception("Invalid URI")
- End If
-
- End Sub
-
- End Module
|
By Steve Gray on
3/15/2011 8:08 AM
I spend most of my day in either SMSS or Visual Studio (currently 2010), and there are a couple of small changes that I’m fond of making. It’s not a big deal, but I really like VS to close the quote marks for me in the HTML editor, it makes typing slightly faster. And, I like the tabs on the tab well to be all the same size. It’s slightly easier to close a bunch of them quickly, you don’t have to move the cursor, you can just click. But, I hate to spend the time to look for these options in Tools > Options, there are so many options. So I thought I’d blog the options and have them on hand the next time I need to set them. In order to get the ‘tabs’ feature, you’ll want to install the Productivity Power Pack (click to enlarge)  Here is the ‘tab’ settings 
|
By Steve Gray on
2/21/2011 3:40 PM
This is a short example on how to create a DataTable dynamically, assign a primary key to it, and then how to update it You can search a data table with or without a primary key, but if you don’t use the key you’ll get back an array of rows; in this case the single row is really what we need. This code is very useful for submitting samples to vendors, you don’t have to fake data connections. There is no error checking, this is just template code. Code Snippet - Function GetDataTable() As DataTable
- Dim oDT As New DataTable
- Dim oKeys(0) As DataColumn
- 'create a data table to use as our input source
-
- 'create columns
- Dim oCol As DataColumn = New DataColumn("order", System.Type.GetType("System.String"))
- oDT.Columns.Add(oCol)
- oKeys(0) = oCol
- oDT.Columns.Add(New DataColumn("salesperson", System.Type.GetType("System.String")))
- oDT.Columns.Add(New DataColumn("amount", System.Type.GetType("System.Double")))
- oDT.PrimaryKey = oKeys
-
- 'create the rows
- oDT.Rows.Add("ORD00100", "Bob@test.com", 1.23)
- oDT.Rows.Add("ORD00102", "Bob@test.com", 3.23)
- oDT.Rows.Add("ORD00104", "Sam@test.com", 2.23)
- oDT.Rows.Add("ORD00105", "Sam@test.com", 4.23)
-
- Return oDT
-
- End Function
-
- Sub updateDataTable(ByVal strOrder As String, ByVal dblAmount As Double)
- Dim oRow As DataRow
-
- '"order" is our primary key. Search the primary key for strOrder
- oRow = oDT.Rows.Find(strOrder)
-
- 'in the row found, set the Amount column
- oRow("amount") = dblAmount
-
- 'save
- oDT.AcceptChanges()
-
- End Sub
|
By Steve Gray on
12/17/2010 11:19 AM
Every time I add the DAAB to an application, I struggle a little with which .dlls to add to my project. So, here it a walk through to get you (and me) started. Download and install the Enterprise Library 5.0 objects. Choose the larger install, the second one. Create a project, and set a reference to these dlls: Microsoft.Practices.EnterpriseLibrary.Common.dll Microsoft.Practices.EnterpriseLibrary.Data.dll Microsoft.Practices.ServiceLocation.dll
That should do it.
|
By Steve Gray on
12/9/2010 4:16 PM
This is the class that I use to abstract the Enterprise Library DAAB. There are other classes, found here
Code Snippet
- Imports Microsoft.VisualBasic
- Imports System.Data.SqlClient
- Imports System.Data
- Imports Microsoft.Practices.EnterpriseLibrary.Data
- Imports Microsoft.Practices.EnterpriseLibrary.Data.Sql
- Imports System.Configuration
-
- Public Class storedProcedure
- Dim _storedProcName As String
- Dim _db As String
- Public commandParameters As System.Collections.Generic.List(Of commandParameter)
- Public CommandTimeout As Int16
- Dim cs As New Dictionary(Of String, String)
-
- Sub New(ByVal StoredProcName As String, ByVal db As String)
- _storedProcName = StoredProcName
- _db = db.ToUpper
- commandParameters = New System.Collections.Generic.List(Of commandParameter)
-
- cs.Add("NGB01", "Data Source=ngb-sql-05;User Id=4pennyapp;Password=app4me;Initial Catalog=NGB01")
- cs.Add("ELSTN", "Data Source=ngb-sql-05;User Id=4pennyapp;Password=app4me;Initial Catalog=ELSTN")
- cs.Add("NGBOED", "Data Source=ngb-sql-05;User Id=4pennyapp;Password=app4me;Initial Catalog=NGBOED")
- cs.Add("STONE", "Data Source=ngb-sql-05;User Id=4pennyapp;Password=app4me;Initial Catalog=STONE")
- cs.Add("INTRANET2", "Data Source=ngb-sql-05;User Id=4pennyapp;Password=app4me;Initial Catalog=Intranet2")
- cs.Add("TWO", "Data Source=vmGP11;User Id=4pennyapp;Password=app4me;Initial Catalog=TWO")
- End Sub
-
- Function execute(ByVal timeout As Int32, ByRef cps As System.Collections.Generic.List(Of commandParameter)) As Int32
- Dim strError As String = ""
- Try
-
- Dim aParams As SqlParameter() = Nothing
- Dim a As Int16 = 0
-
- Dim db As Database
- db = New SqlDatabase(cs(_db))
-
- Dim dbCommand As Common.DbCommand = db.GetStoredProcCommand(_storedProcName)
-
- If timeout > 0 Then
- dbCommand.CommandTimeout = timeout
- End If
-
- For Each cp As commandParameter In commandParameters
- Select Case cp.ParamDirection
- Case ParameterDirection.Input
- db.AddInParameter(dbCommand, cp.ParamName, cp.ParamType, cp.ParamValue)
- Case ParameterDirection.InputOutput
- 'not handled
- Case ParameterDirection.Output
- db.AddOutParameter(dbCommand, cp.ParamName, cp.ParamType, cp.ParamSize)
- Case ParameterDirection.ReturnValue
- 'not handled
- End Select
- Next
- db.AddParameter(dbCommand, "@ReturnValue", DbType.Int32, ParameterDirection.ReturnValue, String.Empty, System.Data.DataRowVersion.Default, 0)
-
- db.ExecuteNonQuery(dbCommand)
- For Each cp As commandParameter In commandParameters
- cp.ParamValue = db.GetParameterValue(dbCommand, cp.ParamName)
- Next
-
- Dim rcp As commandParameter
- rcp = New commandParameter("@Return_Value", 0, DbType.Int16)
- rcp.ParamValue = db.GetParameterValue(dbCommand, "@ReturnValue")
- commandParameters.Add(rcp)
-
- cps = commandParameters
- Return rcp.ParamValue
- Catch ex As Exception
- strError = "query: " & _storedProcName & "<BR>"
- For Each cp As commandParameter In commandParameters
- strError += "params: " & cp.ParamName & " = " & cp.ParamValue.ToString & "<br>"
- Next
-
- ex.Source = strError
- Throw ex
-
- End Try
-
- End Function
- Function execute() As Int32
- Dim intTimeout As Int32 = -1
- Dim cp As New System.Collections.Generic.List(Of commandParameter)
- Return execute(intTimeout, cp)
- End Function
- Function execute(ByRef cp As System.Collections.Generic.List(Of commandParameter)) As Int32
- Dim intTimeout As Int32 = -1
- Return execute(intTimeout, cp)
- End Function
-
- Function executeScalar() As Object
- Dim strError As String = ""
- Try
-
- Dim aParams As SqlParameter() = Nothing
- Dim a As Int16 = 0
- Dim db As Database '= DatabaseFactory.CreateDatabase(_db)
- db = New SqlDatabase(cs(_db))
- Dim dbCommand As Common.DbCommand = db.GetStoredProcCommand(_storedProcName)
- For Each cp As commandParameter In commandParameters
- db.AddInParameter(dbCommand, cp.ParamName, cp.ParamType, cp.ParamValue)
- Next
-
- Return db.ExecuteScalar(dbCommand)
- Catch ex As Exception
- strError = "query: " & _storedProcName & "<BR>"
- For Each cp As commandParameter In commandParameters
- strError += "params: " & cp.ParamName & " = " & cp.ParamValue.ToString & "<br>"
- Next
- strError += ex.Message
- Throw New Exception(strError)
-
- End Try
-
- executeScalar = Nothing
- End Function
- Function getReader(ByVal timeout As Int32) As SqlDataReader
- Dim strError As String = ""
- Try
-
- Dim aParams As SqlParameter() = Nothing
- Dim a As Int16 = 0
- Dim db As Database '= DatabaseFactory.CreateDatabase(_db)
- db = New SqlDatabase(cs(_db))
- Dim dbCommand As Common.DbCommand = db.GetStoredProcCommand(_storedProcName)
- If timeout > 0 Then
- dbCommand.CommandTimeout = timeout
- End If
- For Each cp As commandParameter In commandParameters
- db.AddInParameter(dbCommand, cp.ParamName, cp.ParamType, cp.ParamValue)
- Next
-
- Return db.ExecuteReader(dbCommand)
- Catch ex As Exception
- strError = "query: " & _storedProcName & "<BR>"
- For Each cp As commandParameter In commandParameters
- strError += "params: " & cp.ParamName & " = " & cp.ParamValue.ToString & "<br>"
- Next
-
- ex.Source = strError
- Throw ex
-
- End Try
- getReader = Nothing
-
- End Function
- Function getReader() As SqlDataReader
- getReader = getReader(-1)
-
- End Function
- Function getTable() As DataTable
- getTable = getTable(-1)
- End Function
-
- Function getTable(ByVal timeout As Int32) As DataTable
- Dim strError As String = ""
- Try
-
- Dim aParams As SqlParameter() = Nothing
- Dim a As Int16 = 0
-
- Dim db As Database
- db = New SqlDatabase(cs(_db))
-
- Dim dbCommand As Common.DbCommand = db.GetStoredProcCommand(_storedProcName)
-
- 'set the command timeout
- If timeout > 0 Then
- dbCommand.CommandTimeout = timeout
- End If
-
- For Each cp As commandParameter In commandParameters
- db.AddInParameter(dbCommand, cp.ParamName, cp.ParamType, cp.ParamValue)
- Next
-
- Return db.ExecuteDataSet(dbCommand).Tables(0)
- Catch ex As Exception
- strError = "query: " & _storedProcName & "<BR>"
- For Each cp As commandParameter In commandParameters
- If Not cp.ParamValue Is Nothing Then
- strError += "params: " & cp.ParamName & " = " & cp.ParamValue.ToString & "<br>"
- Else
- strError += "params: " & cp.ParamName & " = Nothing<br>"
- End If
- Next
-
- ex.Source = strError
- Throw ex
- End Try
- getTable = Nothing
-
- End Function
-
- End Class
|
By Steve Gray on
9/23/2010 9:52 AM
I’m testing a product called SmartXLS, here’s my first stab at a class to use it’s properties Imports SmartXLS
Imports System.IO
Public Class SmartXLS
Dim wb As New WorkBook
''' <remarks>zero based</remarks>
Public Columns As Int16
''' <remarks>zero based</remarks>
Public Rows As Int16
''' <summary>
''' Creates a new instance of the SmartXML class
''' </summary>
''' <param name="strFileName">Excel FileName, includes the fill path</param>
''' <remarks></remarks>
Sub New(ByVal strFileName As String)
Dim strExt As String = Path.GetExtension(strFileName)
Select Case strExt.ToUpper
Case ".XLS"
wb.read(strFileName)
Case ".XLSX"
wb.readXLSX(strFileName)
Case Else
Throw New Exception("Invalid file name")
End Select
Columns = wb.LastCol
Rows = wb.LastRow
End Sub
''' <summary>
''' To Read an Excel File and return a Generic List of the column headers
''' </summary>
''' <returns>A Generic List of String values</returns>
Public Function GetExcelColumnHeaders() As List(Of String)
Dim oColumnHeaders As New List(Of String)
Dim Dt As New DataTable()
Try
Dim i As Int32
For i = 0 To Columns
oColumnHeaders.Add(wb.getFormattedText(0, i))
Next
Return oColumnHeaders
Catch ex As Exception
Throw ex
End Try
End Function
''' <summary>
''' To Read an Excel File and Get a DataTable with its values
''' </summary>
''' <returns>A DataTable with Excel Values</returns>
''' <remarks></remarks>
Public Function GetExcelAsDataTable() As DataTable
Dim Dt As New DataTable()
Dim c As Integer = 0
Dim r As Integer = 0
'add the correct number of columns to our datatable
For c = 0 To Columns
Dt.Columns.Add(GetExcelColumnHeaders(c))
Next
'skip the first row
For r = 1 To Rows
Dim dr As DataRow = Dt.NewRow
For c = 0 To Columns
dr(c) = (wb.getFormattedText(r, c))
Next
Dt.Rows.Add(dr)
Next
Return Dt
End Function
End Class
|
By Steve Gray on
9/23/2010 9:02 AM
I ran across a technique that I’ve not used before (you learn something new every day, don’t you?) that I want to document here. It involves decorating a class so that the methods and properties show up in VB when you call the class. Basically, you just add comments above the methods like this: ''' <summary>
''' Creates a new instance of the ExcelHelper class
''' </summary>
''' <param name="strfile">Excel File as Stream</param>
Public Sub New(ByVal strFile As String)
myWorkbook = SpreadsheetDocument.Open(strFile, False)
workbookpart = myWorkbook.WorkbookPart
worksheetPart = workbookpart.WorksheetParts.FirstOrDefault()
stringTablePart = workbookpart.SharedStringTablePart
columns = GetExcelColumns()
End Sub
And when you call the class, you can see the documentation:

Nice, right?
The following XML comment tags are officially supported in VB.NET: c,code, example, exception, include, list, para, param, paramref, permission, remarks, returns, see, seealso, summary and typeparam.
c: This tag is used to denote code, so it can be used to identify sample code associated with a particular entity within the source code. Note that the tag can only be used to represent a single line of code or to denote that some of the text on a line should be marked up as code. Example: <c>Dim MyObject As MyType</c>
code: This tag is used to denote more than one line of code, so it can be used to identify longer areas of sample code.
example: This tag may be used to describe an example of using a particular method or class. It is possible to include code samples within the example tag by making use of either the c or code tags.
exception: The exception tag allows a method's exception handling to be documented. The cref attribute allows the namespace of the exception handler to be included. Example: <exception cref="System.Exception" >Throws an exception if the customer is not found.</exception>
include: This tag allows documentation to be imported from an external XML file rather than being stored within the source code itself. As such it may be useful if the documentation is written by people other than the software developers (e.g. technical writers).
list: This tag allows bulleted or numbered lists or tables to be added to XML comments.
para: This tag indicates that the text within the tags should be formatted within a paragraph. As such it can be used to format text within other tags such as summary or returns. Example: <para>This is a paragraph</para>
param: The param tag is used to document a method's arguments. The tag's name attribute specifies the name of the argument to which the tag refers. The tag is also used by Visual Studio's Intellisense system to show a description of a method's arguments. It is also used by the Visual Studio Object Browser. Example: <param name="FileName" >The filename of the file to be loaded.</param>
paramref: This tag can be used to refer to a method's argument elsewhere within the method's XML comments. The tag's name attribute specifies the name of the argument to which the tag refers. Note that the param tag is actually used to describe the parameter. Example: Use the <paramref name="FileName"/> argument to specify which filename is loaded.
permission: The permission tag can be used to describe any special permissions a specific object needs. The object to which the permission refers is included as the cref attribute. Example: Class needs to write to the file system, ensure user has appropriate access.
summary: The summary tag describes a method or class, so it is the most important tag. As well as being used in a project's documentation, the tag is also used by Visual Studio's Intellisense system to show a description of the method or class being referenced. It is also used by the Visual Studio Object Browser.
remarks: The remarks tag can be used to supply additional information about a method or class, supplementing the details given in the summary tag. As with the summary tag, this tag is also used by Visual Studio's Intellisense system and the Visual Studio Object Browser.
returns: Describes the return value of a method. Example: <returns>True if user has permission to access the resource, otherwise False.</returns>
see: The see tag is used to reference other entities (such as classes) in the project. The see tag is intended for use within other tags such as the summary tag. Example: <seealso cref="System.Configuration"/>
seealso: The seealso tag resembles the see tag and has identical syntax, except that the text is intended to be used to create a separate seealso section for the entity's documentation.
typeparam: Typeparam is used in an identical way to param, except that it is used to document a type associated with a generic class or function.
value: Value is only used when documenting a property, and is used to describe the value assigned to that. The comment is not required for properties that are marked as read only. Example: <value>Sets the employee's salary</value>
|
As always, I welcome your comments! |
|
|
 |
|
|
|
|
|
|