- 236 名前:デフォルトの名無しさん mailto:sage [2010/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()); } } } とか言ってみるテスト。スレッドセーフじゃないよなぁこれは。
|

|