Skip to content

Instantly share code, notes, and snippets.

@fasetto
Last active March 22, 2018 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fasetto/2e633e3c029077f2533fa2ac83dcea1d to your computer and use it in GitHub Desktop.
Save fasetto/2e633e3c029077f2533fa2ac83dcea1d to your computer and use it in GitHub Desktop.
Whats new in C# ?

C# 6.0 News

  • static import
  • when (for filtering exceptions, type switch etc.)
  • nameof operator
  • Null conditional operator (?.)
  • string interpolation
  • Expression bodied function members ( func => ...dosomething)
  • Index initializers
  • await in catch-finally blocks

C# 7.0 News

  • Binary literals (int x = 0b100)
  • Digit sperators (int x = 0b100_10)
  • Local functions
  • Pattern matching
  • ref returns
  • out variables (int.TryParse(str, out var _))
  • Tuples (System.ValueTuple)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment