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:

    For women ... bras, panties, bathing suits, and other stereotypical gear are visual reminders of a commercial, idealized feminine image that our real and diverse female bodies can’t possibly fit. Without these visual references, each individual woman’s body demands to be accepted on its own terms. We stop being comparatives. We begin to be unique.
    Gloria Steinem (b. 1934)

    ... the basic experience of everyone is the experience of human limitation.
    Flannery O’Connor (1925–1964)

    A man’s whole life is taxed for the least thing well done. It is its net result.
    Henry David Thoreau (1817–1862)