c# - 这是哪个 "C# Experimental language feature"?

标签 c# language-features c#-6.0

在下面的示例中,Resharper 在第一个大括号中显示“C# 实验性语言功能”工具提示。我检查了 C# 6.0 的新功能,但没有遇到类似的功能。提到的实验特征是什么?

 class Class1
 {
     { // <= C# Experimental language feature
     }
 }

注意:这是 .Net Framework 4.5 编译器的错误。

"Invalid token '{' in class, struct, or interface member declaration"

最佳答案

Primary Constructors ,现在已成为 cut from C#6 的功能.

关于c# - 这是哪个 "C# Experimental language feature"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30122228/

相关文章:

c# - IIS 托管的 wcf 返回空白页

python - Gensim 中的 TFIDIF 模型创建类型错误

c# - Azure Web应用程序问题: System. Runtime.InteropServices.COMException 80040154类未注册

c# - 如何使用私钥获取证书的 base 64 编码值?

c# - 登录错误消息对象引用

programming-languages - 何时使用处理语言?

c# - 反射是确定动态对象是否存在属性/方法的最佳方法吗?

c# - 没有 get 的自动实现的属性给出编译错误

mono - Mono MCS 中的 C# 6.0 字符串插值

c# - TryParse with out var 参数