Appframe Knowledge Base

1 hits

VB.NET Naming Conventions - Windows Forms

''' <summary>
''' This class demonstrates the naming conventions to be followed when writing
''' Windows GUI applications
''' </summary>
''' <remarks>
''' Forms should always have meaningful names, and should never have names
''' like Form1 or Dialog1!
''' For cases not covered by the example and the general naming convention guideline
''' on this site, refer to the official .NET Guidelines for Names found at
''' </remarks>
Public Class ManagePeople

    Private gEditor As CustomEditorControl

    Public Sub New()


        ' Controls and components created using the visual designer should
        ' use a c prefix for names
        cEditButton.Enabled = False

		' Controls and components created in code should follow general naming
		' conventions for variable names
        gEditor = New CustomEditorControl()

    End Sub

    Private Sub ManagePeople_Load(pSender As Object, pArgs As EventArgs) Handles MyBase.Load

        ' Names of data objects should always match the view name

        ' If you have multiple data objects referencing the same view,
        ' use a meaningful suffix but be careful of collisions with
		' names of actual database object!

    End Sub

End Class

win · Perma link post comment Posted by: Jarl Erik Schmidt (08-mar-2012)