Is there a way to use namespace aliases in Oxygene .net?

ie: Whats the Oxygene equivalent of the C# code using someOtherName = System.Timers.Timer; ?

有帮助吗?

解决方案

Yes that is possible, just define it like you would define a type. For example:

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.
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top