2013-07-08 117 views
0

有沒有辦法在Oxygene .net中使用命名空間別名?Oxygene中的命名空間別名

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

回答

2

是的,這是可能的,只是定義它就像你會定義一個類型。例如:

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.