10/07/04 13:22:00
using System;
using System.Diagnostics;
namespace OnCreate {
class B {
static event Action<Object, EventArgs> Created;
public B() {
OnCreated(new EventArgs());
}
void OnCreated(EventArgs arg) {
if (Created!=null) {
Created(this, arg);
}
}
static void Main(string[] args) {
Created += CreateEventHandler;
B b = new B();
}
static void CreateEventHandler(Object obj, EventArgs arg) {
Console.Out.WriteLine(new StackTrace().ToString());
}
}
}
とか言ってみるテスト。スレッドセーフじゃないよなぁこれは。