Question

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; ?

Était-ce utile?

La solution

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.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top