<< Click to Display Table of Contents >> Navigation: ThinBASIC Core Language > BuiltIn Functions > Date and Time > cTimer > cTimer Methods > <cTimer>.SetName |
Description
Sets the name associated with the instantiated cTimer variable.
Syntax
s = <cTimer>.SetName(sName)
Returns
String: previous description
Parameters
Name |
Type |
Optional |
Meaning |
sName |
String |
No |
Dynamic string to be passed as name |
Remarks
Restrictions
See also
Examples
'---Create a class variable
Dim MyTimer As cTimer
'---Instantiate the class variable. This will automatically call internal Constructor
MyTimer = New cTimer("TIMER1")
...
'---Assign a new Name
MyTimer.SetName("TIMERXXX")
...
'---Will return "TIMERXXX" string
MsgBox 0, MyTimer.GetName