什么是C#中的事件? [英] What is Event in C#?

查看:164
本文介绍了什么是C#中的事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在c#中有什么事件?是否类似于 ActionScript事件?是不一样吗在什么?

解决方案


C#中的一个事件是一个类到
的一种方式当一个有趣的东西
发生在一个对象上时,向客户提供
的通知。
最常用的事件是
图形用户界面;通常,
表示
中的控件的类,当用户向控件执行某项
时,该界面会通知
的事件(例如,单击
按钮)


本教程介绍如何声明,调用和连接C#中的事件 http://msdn.microsoft.com/en-us/library/aa645739%28VS.71 %29.aspx


in c# what is Event? Is it similar to ActionScript Event ? Is it different? In what?

解决方案

An event in C# is a way for a class to provide notifications to clients of that class when some interesting thing happens to an object. The most familiar use for events is in graphical user interfaces; typically, the classes that represent controls in the interface have events that are notified when the user does something to the control (for example, click a button).

This tutorial shows how to declare, invoke, and hook up to events in C# http://msdn.microsoft.com/en-us/library/aa645739%28VS.71%29.aspx

这篇关于什么是C#中的事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆