IT. Expert System.




The Set statement assigns an object reference to a variable or property, or associates a procedure reference with an event.

This statement has the following forms:

Set objectvar = {objectexpression | New classname | Nothing}
Set object.eventname = GetRef(procname)
Parameter Description
objectvar (required) Specifies the name of the variable or property

Note: objectvar must follow the standard variable naming conventions
objectexpression (optional) Specifies an expression consisting of the name of an object, another declared variable of the same object type, or a function or method that returns an object of the same object type
New Specifies a keyword used to create a new instance of a class. If objectvar contained a reference to an object, that reference is released when the new one is assigned. The New keyword can only be used to create an instance of a class.
classname (optional) Specifies the name of the class being created. A class and its members are defined using the Class statement.
Nothing (optional) Discontinues association of objectvar with any specific object or class. Assigning objectvar to Nothing releases all the system and memory resources associated with the previously referenced object when no other variable refers to it.
object (required) Specifies the name of the object with which eventname is associated
eventname (required) Specifies the name of the event to which the function is to be bound
procname (required) Specifies a string containing the name of the Sub or Function being associated with eventname


The following example shows the basic use of this statement:

Class Customer
    Private m_Name

    Public Property Get Name
        Name = m_Name
    End Property

    Public Property Let Name(customerName)
        m_Name = customerName
    End Property
End Class

Dim custA, custB

' Create an instance of the Customer class,
' and assign it to the custA variable
Set custA = New Customer

' Set a property of the custA object.
custA.Name = "Weyland Group"

' Have the custB variable reference the
' same object as the custA variable
Set custB = custA

' Because the custA and custB variables
' reference the same object, the property's
' value is the same in both

Miscellaneous Information

Supported in Version: 1.0


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 235 / 159168593. Delta: 0.00201 с