Dynamic arrays

Top  Previous  Next

What is translated > Types > Arrays > Dynamic arrays


Dynamic arrays become C# arrays:



  // Define dynamic arrays

  byteArray  : Array Of byte;           // Single dimension array

  multiArray : Array Of Array Of string;  // Multi-dimension array



  // Define dynamic arrays

  byte[] byteArray = new byte[]{};           // Single dimension array

  string[][] multiArray = new string[][]{};  // Multi-dimension array



Dynamic arrays are accepted as parameters only, if the type of the array is defined explicitly and if the function expects this type.




FSysLangs: TArray<TLangRec>;

private List<TLangRec> FSysLangs = new List<TLangRec>();


     TLangRec tmp0 = FSysLangs[FSysLangs.Count - 1 /*# High(FSysLangs) */];

     tmp0.FName = GetLocaleDataW(AID, (uint) LOCALE_SLANGUAGE);

     FSysLangs[FSysLangs.Count - 1 /*# High(FSysLangs) */] = tmp0;



This page belongs to the Delphi2C# Documentation

Delphi2C# home  Content