Constructor (object-oriented Programming) - Visual Basic .NET

Visual Basic .NET

In Visual Basic .NET, constructors use a method declaration with the name "New".

Class Foobar Private strData As String ' Constructor Public Sub New(ByVal someParam As String) strData = someParam End Sub End Class ' code somewhere else ' instantiating an object with the above constructor Dim foo As New Foobar(".NET")

Read more about this topic:  Constructor (object-oriented Programming)

Famous quotes containing the words visual, basic and/or net:

    The visual is sorely undervalued in modern scholarship. Art history has attained only a fraction of the conceptual sophistication of literary criticism.... Drunk with self-love, criticism has hugely overestimated the centrality of language to western culture. It has failed to see the electrifying sign language of images.
    Camille Paglia (b. 1947)

    Insecurity, commonly regarded as a weakness in normal people, is the basic tool of the actor’s trade.
    Miranda Richardson (b. 1958)

    Mental events such as perceivings, rememberings, decisions, and actions resist capture in the net of physical theory.
    Donald Davidson (b. 1917)