C# vNext (6.0) Overview

Source => Youtube : C# vNext (6.0) Overview, New Features in C# 6.0


C# 2.0

  • Generics
  • Partial types
  • Anonymous methods
  • Iterators
  • Nullable types
  • Getter/Setter separate accessibility
  • Static Classes
  • And more…..

C# 3.0

  • Implicitly typed local variable (‘var’)
  • Object and collection initializers
  • Auto-properties
  • Anonymous types
  • Extension Methods
  • Query expressions
  • Lambda expressions
  • Expression trees
  • And More….

C# 4.0

  • Dynamic binding (‘dynamic’)
  • Named and optional parameters
  • Generic co- and contravariance
  • And more…

C# 5.0

  • Asynchronous methods (async & await)
  • Caller info attributes

Birth of “Roslyn” – new c# compiler and is an “Open Source”

C# 6.0 (vNext)

  • Auto Property Initializer

Before
image

After
image

  • Primary Constructors

Before
image

After
image

note: Feature ‘primary constructor’ is only available in ‘experimental’ language version
Feature 'primary constructor' is only available in 'experimental' language version

  • Dictionary Initializer

Before
image

After
image

  • Declaration Expressions

Before
image

After
image

note: In C# 6, you can declare an local variable in the middle of the expression. With declaration expressions, we can also declare variables inside if statements and various loop statements.

  • Static Using

Before
image

After
image

note: you have the ability to use the Static Members without using the type name. You can import the static classes in the namespaces to your namespace.

  • await inside catch block

image

  • Exception Filters

Before
image

After
image

  • Conditional Access Operator to check NULL Values

Before
image

After
image

  • And more..

C# 6.0 MAY BE FEATURES

  • Binary literals and Digit separators
  • Expression-bodies members
    image
  • Event initializers
    image
  • Field targets on auto-properties
    image
  • Semicolon operator
    image
  • Using params with IEnumerable
    image
  • Sting interpolations
    image
  • And many more…


*******************************************************************************************************


Source => Youtube : Developer Productivity: What's New in C# 6.0, Microsoft Virtual Academy : Developer Productivity: What's New in C# 6

MVP and best-selling author Bill Wagner teams up with Microsoft Program Manager Anthony Green to explore auto property initializers, expression bodied members, null propagation operators, exception filters, string interpolation, and more. Find out how these new language features can make you more efficient. And see how easy it is to look at your code, diagnose issues, solve problems, and become a C# 6 master.

(01) C# Productivity, Conciseness
Focus on three C# features that can make your code more concise and easier to read and understand: Expression Bodied Members, Static Usings, and Null Condtionals.

(02) Data Transfer Object Support
Learn about Readonly Properties and Dictionary Initializers, features in C# which make it easier to create Data Transfer Object types concisely and correctly, as we do so with the purpose of transferring between Internet-connected programs.

(03) String Handling
Learn about ‚ÄčNameof and String interpolation features, which make it easier to work with mixed symbols and strings in modern programs.

(04) Exceptions and Error Handling
Get the details on Exception Filters and on Await in Catch and Finally features, which give us more robust idioms when we encounter problems.

(05) Adopting C# 6
Find out how to put the features into practice, and see some of the idioms that make null conditionals amazingly useful. Explore how features interrelate with each other, and look at some improvements to the "betterness" definition for method overloading.



http://1drv.ms/1JIHUHo