Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add C# 6.0 to Visual Studio 2013? [duplicate]

Is there any way to add C# 6.0 to Visual Studio 2013? If I can't why is that?

like image 787
Mohamad Shiralizadeh Avatar asked Dec 13 '14 19:12

Mohamad Shiralizadeh


People also ask

Can you multiply in C?

Program to Multiply Two Numbersprintf("Enter two numbers: "); scanf("%lf %lf", &a, &b); Then, the product of a and b is evaluated and the result is stored in product . product = a * b; Finally, product is displayed on the screen using printf() .

What does %d mean in C?

%d. a decimal integer (assumes base 10) %i. a decimal integer (detects the base automatically)

What does %d do?

%d takes integer value as signed decimal integer i.e. it takes negative values along with positive values but values should be in decimal otherwise it will print garbage value.


1 Answers

The best you can currently do for VS2013 is download the April End User Preview, which is pretty outdated by now.

The VS2013 compiler (as is) doesn't "understand" C#-6 features. Most, if not all of the C# new features are syntactic sugar which the compiler interprets and emits different code for. In order for VS2013 to support that, it has to upgrade the compiler to support those features.

Not to mention VS2015 will bring with it a completely new CSC, named Roslyn

For example, expression body properties:

public override string ToString() => string.Format("{0}, {1}", First, Second);

Compiles down to:

public override string ToString()
{
   return string.Format("{0}, {1}", First, Second);
}
like image 61
Yuval Itzchakov Avatar answered Oct 20 '22 16:10

Yuval Itzchakov