首页 > 解决方案 > 如何在 ASP.Net 标记中定义 c# 版本

问题描述

我想知道是否可以在 5.0 版之后发布的 ASP.Net 标记(*.aspx 和 *.ascx 文件)中使用 c# 语言功能。是否有可能在 aspx 页面的标题区域中声明标记语言版本?

我希望我们使用空传播运算符并收到以下错误:

Feature 'null propagating operator' is not available in C# 5. Please use language version 6 or greater. 

标签: c#asp.netmarkup

解决方案


推荐阅读