зеркало из https://github.com/dotnet/roslyn.git
Страница:
Languages features in C# 6 and VB 14
Страницы
API Changes
Branch Cleanup
Building Testing and Debugging
C# Interactive Walkthrough
Changelog for C# and VB compilers
Compiler Queries
Compiler release process
Compiler supporting types
Contributing Code
Diagnosing Project System Build Errors
EnC Supported Edits
FAQ
Getting Started C# Semantic Analysis
Getting Started C# Syntax Analysis
Getting Started C# Syntax Transformation
Getting Started VB Semantic Analysis
Getting Started VB Syntax Analysis
Getting Started VB Syntax Transformation
Getting Started Writing a Custom Analyzer & Code Fix
Getting Started on Visual Studio 2015 CTP 5
Getting Started on Visual Studio 2015 CTP 6
Getting Started on Visual Studio 2015 Preview
Getting Started on Visual Studio 2015 RC
Getting Started on Visual Studio 2015
Home
How To Investigate CI Test Failures
How To Write a C# Analyzer and Code Fix
How To Write a Visual Basic Analyzer and Code Fix
How to support new C# language features by Edit And Continue (ENC)
Interactive Window
Labels used for issues
Languages features in C# 6 and VB 14
Linux Instructions
Manual Testing
Measuring Compiler Performance
New Language Features in C# 6
New Language Features in VB 14
Notes on formatting
Notes on nullability
NuGet packages
Performance Investigations
Performance considerations for large solutions
Recording performance traces with PerfView
Reporting Visual Studio crashes and performance issues
Responding to customers encountering crashes or performance issues
Roadmap
Roslyn Overview
Runtime code generation using Roslyn compilations in .NET Core App
Samples and Walkthroughs
Scripting API Samples
Syntax Visualizer
Troubleshooting tips
VS 2015 CTP 5 API Changes
VS 2015 CTP 6 API Changes
VS 2015 RC API Changes
Walkthroughs
0
Languages features in C# 6 and VB 14
Anthony D. Green редактировал(а) эту страницу 2015-07-20 04:28:42 -07:00
- Exists: Already shipped in previous release
- Added: Implemented for this release
- Planned: Intended for this release
- No: Not intended for this release
- N/A: Not meaningful for this language
Please note that everything is still subject to change - this is a preview after all. However, we are reasonably confident about the overall feature set at this point.
Visual Studio 2015 RC has the following features. For a description of each feature see:
Feature | Example | C# | VB |
---|---|---|---|
Auto-property initializers | public int X { get; set; } = x; |
Added | Exists |
Read-only auto-properties | public int Y { get; } = y; |
Added | Added |
Ctor assignment to getter-only autoprops | Y = 15 |
Added | Added |
Static imports | using static System.Console; … Write(4); |
Added | Exists |
Index initializer | new JObject { ["x"] = 3 } |
Added | No |
Await in catch/finally | try … catch { await … } finally { await … } |
Added | No |
Exception filters | catch(E e) when (e.Count > 5) { … } |
Added | Exists |
Partial modules | Partial Module M1 |
N/A | Added |
Partial interfaces | Partial Interface I1 |
Exists | Added |
Multiline string literals | "Hello<newline>World" |
Exists | Added |
Year-first date literals | Dim d = #2014-04-03# |
N/A | Added |
Comments after implicit line continuation | Dim addrs = From c in Customers ' comment |
N/A | Added |
TypeOf ... IsNot ... | If TypeOf x IsNot Customer Then … |
N/A | Added |
Expression-bodied members | public double Dist => Sqrt(X * X + Y * Y); |
Added | No |
Null-conditional operators | customer?.Orders?[5] |
Added | Added |
String interpolation | $"{p.Name} is {p.Age} years old." |
Added | Added |
nameof operator | string s = nameof(Console.Write); |
Added | Added |
#pragma | #Disable Warning BC40008 |
Added | Added |
Smart name resolution | N/A | Added | |
Read-write props can implement read-only interface properties | Exists | Added | |
#Region inside methods | Exists | Added | |
Overloads inferred from Overrides | N/A | Added | |
CObj in attributes | Exists | Added | |
CRef and parameter name | Exists | Added | |
Extension Add in collection initializers | Added | Exists | |
Improved overload resolution | Added | N/A |
Performance considerations for large solutions
Other documentation in the repo
Contributors
Building, Testing, and Debugging
Tool Authors
Status
Edit-and-Continue Supported Edits
.NET Core
Interactive and Scripting
Interactive Window Documentation