Delphi -> Delphi prism, how to use array of records?

Posted by Pierre on Stack Overflow See other posts from Stack Overflow or by Pierre
Published on 2009-10-04T07:27:13Z Indexed on 2010/06/12 6:13 UTC
Read the original article Hit count: 283

Filed under:
|
|
|

Hi there.

I'm learning Delphi Prism, and i don't find how to write the following code with it :

type
  TRapportItem = record
   Label : String;
   Value : Int16;
   AnomalieComment : String;
  end;

type 
  TRapportCategorie = record
    Label : String;
    CategoriesItems : Array of TRapportItem;
  end;

type 
  TRapportContent = record
    Categories : array of TRapportCategorie;
  end;

Then, somewhere, i try to put items in the array :

rapport.Categories[i].Label:=l.Item(i).InnerText;

But it doesn't work.. Can someone enlight me?

Thanks!

© Stack Overflow or respective owner

Related posts about delphi

Related posts about arrays