Share via


Set.new Method

Creates a set that can contain elements of the specified type.

Syntax

public void new(Types Type)

Run On

Called

Parameters

Remarks

The type of the set cannot be changed after the set has been created.

Examples

The following example creates a set of integers and a set of objects.

{ 
    // Create a set of integers. 
    Set is = new Set (Types::Integer); 
     
    // Create a set of objects. 
    Set os = new Set (Types::Class); 
}

See Also

Set Class

Set::create Method

Set.add Method