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:

    Nowadays people’s visual imagination is so much more sophisticated, so much more developed, particularly in young people, that now you can make an image which just slightly suggests something, they can make of it what they will.
    Robert Doisneau (b. 1912)

    Man has lost the basic skill of the ape, the ability to scratch its back. Which gave it extraordinary independence, and the liberty to associate for reasons other than the need for mutual back-scratching.
    Jean Baudrillard (b. 1929)

    Even in harmonious families there is this double life: the group life, which is the one we can observe in our neighbour’s household, and, underneath, another—secret and passionate and intense—which is the real life that stamps the faces and gives character to the voices of our friends. Always in his mind each member of these social units is escaping, running away, trying to break the net which circumstances and his own affections have woven about him.
    Willa Cather (1873–1947)