在C#是什麼C#事件訂閱
public class blah
{
public event EventHandler Blahevent;
}
與
public class blah
{
private event EventHandler blahevent;
public event EventHandler Blahevent
{
add
{
blahevent+=value;
}
remove
{
blahevent-=value
}
}
}
反之亦然優勢。
沒有第一個打開你到blahinstance.Blahevent = null;或者blahinstance.Blahevent(OBJ,偶數)
你能做到 blahinstance.Blahevent = null 或blahinstance.Blahevent(obj,even),如果它只是一個公共? – maxfridbe 2009-02-24 20:28:35