Home  |  Latest News  |  Contribute  |  F.A.Q.  |  Account  |  Scripts | About
Search ASPNut:
 
ASP Reference
Server Variables
ASP Glossary
Related Sites

Free Components

HTML Reference
Web Colors
Entities
CSS Level 1
Encode/Decode
Glossary

Our Sponsors
ASP Nuke CMS
Free Auctions
PHP 5 Script
Funktastic Blog
ULost Directory
Team Task

 

 

 

 

 

 

 

 

 

 

 

 

New

The New statement allows you to create new instances of a class. Usually, this class will be one that you have defined through ASP code (using the Class statement).

You don't need to worry about destroying instances of your class since ASP will destroy them automatically for you once they go out of scope. If you do wish to destroy an object, you can set it equal to nothing.

Class Shape
    Private m_sColor
    Public Property Get Color()
        Color = m_sColor
    End Property

    Public Property Let Color(sColor)
        m_sColor = sColor
    End Property
End Class

Dim oCircle
Set oCircle = New Shape
oCircle.Color = "Red"
Response.Write "My circle is " & oCircle.Color

' destroy the circle Set oCircle = Nothing

Orvado Technologies

ASP Nuke CMS
Free Open Source
Content Manager
HomeFix Boards
Home Remodeling
Message Boards

Contact Us | Contribute | About | Site Map



"Damn the torpedoes! Full speed ahead!" - David G. Farragut

©2007 Orvado Technologies, All Rights Reserved
ASP Nut provides articles and reference documentation for Active Server Page developers.