C#3.5中的事件 - 有什么新东西吗? [英] Events in C# 3.5 - Anything New?

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

问题描述

从.NET 1.1迁移到2.0,我们获得了通用的System.EventHandler< T>

,这使我们在实施活动时的生活变得更轻松。

现在我们很快就会得到.NET 3.5,我想知道3.5中有任何新的与事件相关的功能或功能。

谢谢!

Moving from .NET 1.1 to 2.0, we gained the generic System.EventHandler<T>
which makes our lives easier when it comes time to implement an event.

Now we''re getting .NET 3.5 soon and I''m wondering of there are any new
event-related features or capabilities in 3.5.

Thanks!

推荐答案

Smithers< A@B.comwrote:
Smithers <A@B.comwrote:

从.NET 1.1迁移到2.0,我们获得了通用的System.EventHandler< T>

,这使我们在实施活动时的生活变得更轻松。

现在我们很快就会得到.NET 3.5,我想知道3.5中有任何与事件相关的新特性或功能。
Moving from .NET 1.1 to 2.0, we gained the generic System.EventHandler<T>
which makes our lives easier when it comes time to implement an event.

Now we''re getting .NET 3.5 soon and I''m wondering of there are any new
event-related features or capabilities in 3.5.



好​​吧,代理是事件的基础,而lambda表达式使得

委托实例创建更容易。


在图书馆方面,WPF更改了UI中处理事件的方式,

" routed events" - 查看它们以获取更多信息 - 但这不是

真的与C#中的事件有关。


-

Jon Skeet - < sk *** @ pobox.com>
http://www.pobox.com/~skeet 博客: http://www.msmvps.com/jon.skeet

如果回复小组,请不要给我发邮件

Well, delegates are the basis of events, and lambda expressions make
delegate instance creation easier.

On the library front, WPF changed how events are handled in UI, with
"routed events" - look them up for more information - but that''s not
really anything to do with events in C# as a language.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


8月8日下午1:39,Smithers < A ... @B.comwrote:
On Aug 8, 1:39 pm, "Smithers" <A...@B.comwrote:

从.NET 1.1迁移到2.0,我们获得了通用的System.EventHandler< T>

在实施活动时让我们的生活变得更轻松。


现在我们很快就会得到.NET 3.5,我想知道有什么新东西

3.5中与事件相关的功能或功能。


谢谢!
Moving from .NET 1.1 to 2.0, we gained the generic System.EventHandler<T>
which makes our lives easier when it comes time to implement an event.

Now we''re getting .NET 3.5 soon and I''m wondering of there are any new
event-related features or capabilities in 3.5.

Thanks!



这些版本号越来越混乱。我相信这是.NET 3.5附带的C#3.0

。 C#2.0随.NET 3.0和.NET 2.0一起提供。

我仍​​然不知道为.NET 3.0提供更新的主要

版本号的原因。自从称之为.NET 2.5后,它本来会有更多。

These version numbers are getting confusing. I believe it''s C# 3.0
that ships with .NET 3.5. C# 2.0 shipped with .NET 3.0 and .NET 2.0.
I still don''t buy the reasoning behind giving .NET 3.0 a newer major
version number. It would have made more since to call it .NET 2.5.




8月8日晚上10点40分,Brian Gideon< briangid ... @ yahoo.comwrote:

On Aug 8, 10:40 pm, Brian Gideon <briangid...@yahoo.comwrote:

这些版本号越来越混乱。我相信这是.NET 3.5附带的C#3.0

。 C#2.0随.NET 3.0和.NET 2.0一起提供。

我仍​​然不知道为.NET 3.0提供更新的主要

版本号的原因。自从称之为.NET 2.5以来,它本来会做得更多。
These version numbers are getting confusing. I believe it''s C# 3.0
that ships with .NET 3.5. C# 2.0 shipped with .NET 3.0 and .NET 2.0.
I still don''t buy the reasoning behind giving .NET 3.0 a newer major
version number. It would have made more since to call it .NET 2.5.



所以你认为2.5介于2.0和3.0之间?请提供

理由,但不包括Apple这个词。

So you consider 2.5 to be halfway between 2.0 and 3.0? Please supply
rationale that doesn''t include the word Apple.


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

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