您可以使用可选参数在code瞄准的.Net 3.5? [英] Can you use Optional Parameters in code targeting .Net 3.5?

查看:159
本文介绍了您可以使用可选参数在code瞄准的.Net 3.5?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在找编写使用的C#4.0新的可选参数功能的图书馆,但我想它的目标到3.5版本届框架。这可能吗?是可选参数,同样的方式,扩展方法语法糖?

I'm looking to write a library that uses the new optional parameters feature of C# 4.0, but I want to target it to the 3.5 version of th framework. Is this possible? Are optional parameters syntactic sugar in the same way that Extension Methods are?

推荐答案

使用VS2010 RC,我能创造一个.NET 3.5应用程序使用可选的参数,在C#。

With VS2010 RC, I was able to create a .NET 3.5 application that uses optional parameters in C#.

所以,是的,它是所有关于语法糖。

So yes, it's all about syntactic sugar.

这篇关于您可以使用可选参数在code瞄准的.Net 3.5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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