h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

Custom Event in VB.Net

Custom Event in VB.Net

Here are the Example for Custom Event in VB.net


Dim _handlers As New List(Of EventHandler)
 Public Custom Event AnyName As EventHandler
        AddHandler(ByVal value As EventHandler)
            AddHandler <Control Name>.<Event>, value
        End AddHandler

        RemoveHandler(ByVal value As EventHandler)
            RemoveHandler <Control Name>.<Event>, value
        End RemoveHandler

        RaiseEvent(ByVal sender As Object, ByVal e As System.EventArgs)
            For Each handler As EventHandler In _handlers
                Try
                    handler.Invoke(sender, e)
                Catch ex As Exception
                    Debug.WriteLine("Exception while invoking event handler: " & ex.ToString())
                End Try
            Next
        End RaiseEvent
    End Event

C# Coding Conventions

C# Coding Conventions


  • Naming Conventions

    Capitalization Conventions
Describes the different casing systems and when each should be used.
    General Naming Conventions
Describes general rules for selecting clear, readable names.
     Names of Assemblies and DLLs
Describes conventions for naming managed assemblies.
     Names of Namespaces
Describes conventions used for namespace names and how to minimize conflicts between namespaces.
     Names of Classes, Structs, and Interfaces
Describes conventions that should be followed, as well as those that should be avoided, when naming types.
     Names of Type Members
Describes the best practices for selecting names for methods, properties, fields, and events.
     Names of Parameters
Describes the best practices for choosing meaningful parameter names.
     Names of Resources
Describes the best practices for selecting names for localizable resources.


  • Layout Conventions
  • Comments Conventions
  • Language Guidelines