Static Class Items
Monkey Forums/Monkey Programming/Static Class Items
| ||
| Please correct me if I have made an incorrect assumption. A class function is static. A class method relates to the instance of an object. Can I have static variables? I would like to store the list of an item type within the relative class. Thanks -Chris :) |
| ||
| Static variables are globals inside a class, if I'm not wrong. Those variables are "shared" across all class instances and derived classes. |
| ||
Class Test
Global list:List = New List<Test>
Function Hello:Void()
Print "HELLO"
End
End Class
Test.list
Test.Hello()
:) |
| ||
| Ahh got ya, so like... Sorry therevills, didn't see your reply :) |