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

Was it helpful?

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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top