Search code examples
c#language-featuresc#-6.0

Which "C# Experimental language feature" is this?


In the example below, Resharper shows "C# Experimental language feature" tooltip on the first curly bracket. I've checked the new features of C# 6.0 but didn't come across a similar one. What is the referred experimental feature?

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

Note: It is an error for .Net Framework 4.5 compiler.

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


Solution

  • This was for Primary Constructors, a feature which has now been cut from C#6.