Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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"

like image 958
henginy Avatar asked May 08 '15 11:05

henginy


People also ask

What is %d in C programming?

In C programming language, %d and %i are format specifiers as where %d specifies the type of variable as decimal and %i specifies the type as integer. In usage terms, there is no difference in printf() function output while printing a number using %d or %i but using scanf the difference occurs.

What does %c mean in C?

%d is used to print decimal(integer) number ,while %c is used to print character . If you try to print a character with %d format the computer will print the ASCII code of the character.

Is C still used in 2022?

Let's say you are new to programming. There are a variety of languages to choose from. Many people will recommend Python as your first language because of its short syntax which makes it very attractive.


1 Answers

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

like image 114
Lukazoid Avatar answered Oct 12 '22 20:10

Lukazoid