CSet:Add


The Add method appends a member to the end of the set.

Syntax

CSet:Add( member )

where

    member is the object to append after the end of the set.

  

This method adds (appends) a member at the end of the set. In comparison, the Insert method adds a member prior to an index within the set.

Example

The following script appends some strings to a CSet:

S = CSet:new()

-- create a CSet

S:Add("First")

-- add a string to the set

S:Add("Second")

-- add a string to the set

S:Add("Third")

-- add a string to the set

Printf("N= %d", S:Count())

-- Result: N = 3

Related Topics

Insert

CSet class