我正在使用C#6.0测试Visual Studio 2015,但语言功能不起作用.在MVC Web应用程序中,以下代码编译:
if (!string.IsNullOrWhiteSpace(Model.Profile?.TypeName))
{
// More logic here...
}
Run Code Online (Sandbox Code Playgroud)
但是,当我通过Debug和IIS Express运行应用程序时,我收到以下错误:
CS1525:无效的表达式术语'.'
如何启用这些功能?