Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Errors from C# 6.0 syntax [duplicate]

I turned on C# 6.0 as Resharper suggested. I love the changes but it appears to me Visual Studio 2013 and C# 6.0 don't really like each other because when I use lambdas for operators like in

public static MVector operator +(MVector l, MVector r) => new MVector(l.X+r.X, l.Y+r.Y);

It says there should be a ';' instead of the lambda but doesn't underline it with red. I turned everything I could to lambdas in that file and got lots of errors but nothing is underlined which is weird.

like image 763
Preza8 Avatar asked Apr 19 '26 02:04

Preza8


1 Answers

Visual Studio 2013 doesn't support C# 6.0. Visual Studio 2015 (which will RTM on 2015-07-20) does.

Visual Studio 2013 used to support some beta version of Roslyn, but that wasn't updated to the latest versions of Roslyn.

like image 168
i3arnon Avatar answered Apr 20 '26 16:04

i3arnon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!