| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

My-References

Page history last edited by Corey Alix 15 years, 3 months ago

VB.NET Code Convention

ByVal parameters are prefixed with "pi" for "Parameter Input".

ByRef parameters are prefixed with "po" for "Parameter Output".

Local variables are prefixed with "lv" for "Local Variable".

Member variables are prefixed with "m_".

The return variable is always called lvResult.

Every Catch makes a call to ReportError so no exception gets lost.

 

Example:

Function TryAdd(ByRef poX As Int32, ByVal piY As Int32) As Boolean

     Dim lvResult = True

     Try

          poX += piY;

     Catch ex As Exception

          ReportError(ex)

          lvResult = False

     End Try

     Return lvResult

End Function

Comments (0)

You don't have permission to comment on this page.