ThingsAdd Method (String) |  |
Hartismere School[This is preliminary documentation and is subject to change.]
Adds a new Thing to the collection of Things.
Namespace: EJW.TextBasedAdventureAssembly: EJW.TextBasedAdventure (in EJW.TextBasedAdventure.dll) Version: 2.0.5850.21153
Syntaxpublic Thing Add(
string Name
)
Public Function Add (
Name As String
) As Thing
public:
Thing^ Add(
String^ Name
)
member Add :
Name : string -> Thing
Parameters
- Name
- Type: SystemString
Name of the Thing.
Return Value
Type:
ThingThe new Thing.
ExceptionsException | Condition |
---|
Exception | Name must be unique. |
Examples
To add a new Thing...
Game g = new Game("Demo");
g.Things.Add("hat");
See Also