1

I have gotten quite use to being able to use lambda throughout my c# projects and in Visual Studio 2015 preview I can now use my properties as so:

public ObservableCollection<WorkspaceViewModel> Workspaces => workspaces ?? (workspaces = new ObservableCollection<WorkspaceViewModel>());

or

public string Something => something;

However when switching between Visual Studio 2015 and 2013... 2013 doesn't like them :(

Is there a way I can force 2013 to read these expressions and compile them properly, I understand MSbuild is open source now, do I have to tell 2013 to use a new version of MSbuild?

Cheers.

bl4kh4k
  • 1,440
  • 4
  • 20
  • 34

1 Answers1

1

This is a c# 6 feature, you can get it working in VS 2013 but it seems that is no longer updated and was just used for previews.

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

From the Roslyn site it says

You can also try April's End User Preview, which installs on top of Visual Studio 2013. (note: this VS 2013 preview is quite out of date, and is no longer updated)

Who knows if it will come out in VS2013 again...

Community
  • 1
  • 1
Dylan
  • 1,074
  • 8
  • 8