(´・∀・`) JScript .NET スレッド at TECH
[2ch|▼Menu]
93:デフォルトの名無しさん
06/10/06 16:48:28
URLリンク(msdn2.microsoft.com) の使用例を
JScriptにしてみたけど、とりあえず動作するからこんなんでいいのかな。
import System;
import System.Timers;
public class Timer1 {
    public static function Main(): void
    {
        var aTimer : Timer = new Timer();
        aTimer.add_Elapsed(OnTimedEvent);
        aTimer.Interval = 2000;
        aTimer.Enabled = true;
        Console.WriteLine("Press the Enter key to exit the program.");
        Console.ReadLine();
        GC.KeepAlive(aTimer);
    }
    private static function OnTimedEvent(source : Object, e : ElapsedEventArgs): void
    {
        Console.WriteLine("Hello World!");
    }
}
Timer1.Main();


次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

5378日前に更新/43 KB
担当:undef