(´・∀・`) JScript .NET スレッド
at TECH
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