【发布时间】:2010-11-12 04:18:21
【问题描述】:
我首先引用 this question 开始,但在尝试使用 Delphi XE 中的 .NET 程序集返回 类 或 类数组 时遇到了障碍.
考虑以下几点:
//C#
[ComVisible(true)]
public class Person {
public int Id;
public string Name;
}
public class SomeClass
{
public SomeClass() {}
public Person[] GetPersons()
{
//some code
}
}
//Delphi
type TPerson = class
Id : Integer;
Name : string;
end;
我如何理解从 GetPersons() 返回的数据,我可以在 Delphi 中将其分配给 array of TPerson?
【问题讨论】:
标签: delphi clr delphi-xe jedi-code-library