什么新在C#4静态类型的家伙 [英] whats new in C# 4 for a static-typed guy

查看:128
本文介绍了什么新在C#4静态类型的家伙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先让我说,我知道的有关动态,无PIA,命名和可选参数,最后协变和逆变。

first of all let me say that I know about dynamic, no PIA, named and optional parameters and finally covariance and contravariance.

在我的项目中99%的时间我的code是在C#中,我几乎没做办公自动化,我不打算在短期内使用任何动态语言,除了是必要的办公自动化,我想命名和可选参数是错误的(没有,过载不计,如果你有很多重载的问题是在设计,不是语言)。

In my projects 99% of the time my code is in C#, I almost never do Office automation, I don't plan to use any dynamic language any time soon, and, besides being necessary for Office automation, I think named and optional parameters are wrong (and no, overloads do not count, if you have that many overloads the problem is in the design, not the language).

那么什么有一个C#的家伙在静态类型的世界?出现的唯一的事情是协变和逆变,这听起来不错,但我希望更多的东西。我很高兴能尝试的唯一位是平行扩展LINQ的,但仅此而已(这就是[可供3.5 <一个href="http://www.microsoft.com/downloads/details.aspx?FamilyId=348F73FD-593D-4B3C-B055-694C50D2B0F3&displaylang=en"相对=nofollow>作为一个CTP )。

So whats there for a C# guy in a static-typed world?, The only thing appears to be covariance and contravariance, which sounds great, but I was hoping something more. The only bits that I'm excited to try are the parallel extensions for Linq but that's about it (and that's [available for 3.5 as a CTP).

你为什么要退出关于C#4?

Why are you exited about C# 4?

推荐答案

值得兴奋的在C#4从非COM,非动态的角度来看的唯一的事情是协变和逆变。其他的一切都是围绕动态类型。

The only thing to be excited about in C# 4 from a non-COM, non-dynamic standpoint are covariance and contravariance. Everything else is centered around dynamic typing.

这篇关于什么新在C#4静态类型的家伙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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