更新时间:2023-09-21 21:43:22
没有用于设置语言版本的UI功能,但是您可以卸载项目文件并将<LangVersion>11</LangVersion>
添加到默认的Visual Basic中以2012/2013语言设置. C#项目将此属性添加到项目配置"属性组下,因此,为了保持一致,我在下面的示例中进行了同样的操作.
There is no UI feature to set the Language version, but you can unload the project file and add <LangVersion>11</LangVersion>
to default Visual Basic to the 2012/2013 language settings. The C# project adds this property under the Project Configuration property groups, so for consistency's sake I've done the same in the sample below.
除了C#使用一组不同的版本号之外,C#属性页执行相同的操作.
The C# property pages do the same thing, except that C# uses a different set of version numbers.
可以在此处找到所有语言版本的完整版本.
2002 (VB 7.0)
2003 (VB 7.1)
2005 (VB 8.0)
2008 (VB 9.0)
2010 (VB 10.0)
2012 (VB 11.0)
2015 (VB 14)
刚刚测试过,这对我有用,但是我确实不得不将大小写更改为:
Just tested and this works for me, but I did have to change the casing to:
结果是:
一个不错的构建失败: