L
Laura Stern
Guest
I just posted an answer before I saw this real example. It seems to have gotten lost. But no matter, I will answer the real question. 1. I don't know why you are creating the resultArray (which i presume should be the variable "results"!). That will be created by .NET and returned to you from the readFile() method. You are creating it and then it is just getting replaced. 2. For future reference (since now you don't need it here), you don't need to use TypeHelper anymore to create a .NET array instance. You had to when we first introduced this, but no more (don't remember what version that changed in). Now you could do: results = NEW "ScanResult[]"(3). 3. What is scanCode? You seem to be missing some things here. I presume you meant results[0]:CodeText. As you've already shown, you can't just use the array syntax [0] on a .NET array. You need to use GetValue. In theory, you would do: results:GetValue(0):CodeText. But GetValue returns a System.Object, so this would have to be CAST to access the CodeText property. Probably better to split it into 2 statements. result = CAST(results:GetValue(0), . myCodeText = results:CodeText.
Continue reading...
Continue reading...