var
  LArr: TArray<TClass>;
  l1: TArray<string>;
begin
  LArr := TArray<TClass>.Create(TEdit, TComboBox);
  l1 := TArray<string>.Create('a', 'b', 'ccc');
end;

 

System.pas是这样定义的:

TArray<T> = array of T;

原来也是类 //注意这个说法是错误的,实际是语法糖,盒子上武大侠解惑了。另外,10.4后有些改变。

http://bbs.2ccc.com/topic.asp?topicid=588603

 

相关文章:

  • 2022-01-23
  • 2021-12-01
  • 2022-02-01
  • 2021-09-07
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-15
  • 2022-12-23
  • 2021-11-07
  • 2022-02-23
  • 2022-12-23
  • 2021-12-05
相关资源
相似解决方案