有办法在Oxygene.net中使用命名空间别名吗?
即:C#代码的Oxygene等价物是什么using someOtherName = System.Timers.Timer;
?
是的,只要像定义类型一样定义它就可以了。例如:
namespace ConsoleApplication37;
interface
type
ConsoleApp = class
public
class method Main(args: array of String);
end;
someOtherName = System.Timers.Timer;
implementation
class method ConsoleApp.Main(args: array of String);
begin
var t1 := new someOtherName;
end;
end.