vs2008新特性
来源:百度文库 编辑:神马文学网 时间:2024/10/02 16:47:22
源地址:http://blog.csdn.net/aaronbai/archive/2008/07/16/2662564.aspx
首先看一下IDE方面的改进:
1)javacscripthtml css 智能感知,这个功能还是比较期待的
2)javascript调试功能
3)html编辑器在源文件和设计的基础增加split查看方式,这样就可以边改源文件边查看效果了
4)智能感知方面,在可选列表可见状态下按下Ctrl键,可以使列表透明,以查看被遮盖的部分,松开Ctrl后继续进行选择。
5)在创建项目之前,可以选择.netframework 的版本。这样,在使用vs 2008 强大IDE 的同时,可以创建 .基于net fx2.0 或 .net fx 3.0 的项目,而不用切换到vs2005下面。
重要的还是语言特性方面的改进:
1)扩展方法:
扩展方法允许编程人员在静态类上编写自己的方法,以扩充静态类的功能。
比如我们可以写这样一个方法:
public static bool IsPrime(this int integer)
{
if(integer == 1)
{
return false;
}
for(int i = 2;i <= Math.Sqrt(integer); i++)
{
if(integer % 2 == 0)
return false;
}
return true;
}
之后就可以这么写:
int i = 1798517;
if(i.IsPrime())
{
Cons
首先看一下IDE方面的改进:
1)javacscript
2)javascript调试功能
3)html编辑器在源文件和设计的基础增加split查看方式,这样就可以边改源文件边查看效果了
4)智能感知方面,在可选列表可见状态下按下Ctrl键,可以使列表透明,以查看被遮盖的部分,松开Ctrl后继续进行选择。
5)在创建项目之前,可以选择.net
重要的还是语言特性方面的改进:
1)扩展方法:
之后就可以这么写: