开发者

How can I get the type of an event?

I have a checkbox and I want to know the type of e when CheckedChanged event is fired. c#

开发者_StackOverflow社区
protected void CheckBox_CheckedChanged(object sender, EventArgs e)


every object in .net have method GetType() to get type of it i.e method of the base class object which is get inherited by every type.

so to get the type of the event you can use e.GetType() method will give you type of your event.


Set an breakpoint at the event and quick watch e. The Type should be displayed

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜