What features of C # 7.0 are available in VS "15" Preview?

As you know at the build 2016 conference, the next version of visual studio was introduced as Visual Studio Enterprise "15" Preview . I uploaded the ISO of this preview to check out the new features in C # 7.0. As stated in a C # presentation session at an assembly conference, I added __DEMO__ and __DEMO_EXPERIMENTAL__ conditional compilation symbols to my project. Now I have these functions:

  • Local functions
  • Digit Segmenters
  • Binary literals
  • Pattern matching

But these two do not work and build with errors:

  • Ref Returns and Ref Locals
  • Tuple literary syntax

Can you help me why I can not check these last two functions?

+5
source share
2 answers

Today, April 12, 2016, 12:16 pm (CDT), the tuple function is in the “prototyping” phase and is not yet available. This is independent of conditional compilation characters. For more on C # 7.0, see Roslyn .

Actually, a closer look at the list - it seems that pattern matching also in "prototyping", which means that I have to fix it. If so, then you can remove the local Roslyn compiler locally from the tuple branch found here . Then use this assembly to compile the experimental code, as indicated here .

+5
source

A preview of Visual Studio 15 will allow you to play with some of the proposed C # 7.0 features, more specifically:

  • local functions
  • number separators
  • binary literals
  • ref returns
  • and pattern matching

Basically what you already mentioned. Here is the source. It is unclear when others will be available.

+1
source

Source: https://habr.com/ru/post/1246939/


All Articles