How to access a specified TList Item?

BlitzMax Forums/BlitzMax Beginners Area/How to access a specified TList Item?

Yep ValueAt Index returns a TObject, the most basic kind of type which needs to be type cast into your type. That's what you (Benyboy) have done by wrapping the call with String() but it's weird it doesn't work for you because this works for me:


Strict

Local MyList:TList = New TList
MyList.AddLast("a")
MyList.AddLast("b")
MyList.AddLast("c")

Print String(MyList.ValueAtIndex(1))