c# 6 new features

13
Zahid Mian Part of the Brown-bag Series

Upload: zahid-mian

Post on 18-Aug-2015

15 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: C# 6 New Features

Zahid MianPart of the Brown-bag Series

Page 2: C# 6 New Features

Roslyn … in many ways a game-changer Devs can now write compiler level “add-ins”

Enforce Rules and/or Coding Standards

Roslyn Analyzer (https://msdn.microsoft.com/en-us/magazine/Dn879356.aspx)

https://github.com/DustinCampbell/CSharpEssentials

https://github.com/Wintellect/Wintellect.Analyzers

New Features “suck” if you get paid by the lines of code

Page 3: C# 6 New Features

Be careful not to “abuse” this feature

Output

Page 4: C# 6 New Features
Page 5: C# 6 New Features

When a function or property returns a value

Use lambda operator to return value

Reduces “cluttered” code

Page 6: C# 6 New Features

No Need to match up arguments; simply put the expression in curly braces

Support for IntelliSense

Page 7: C# 6 New Features
Page 8: C# 6 New Features
Page 9: C# 6 New Features

Syntactic sugar

Page 10: C# 6 New Features
Page 11: C# 6 New Features
Page 12: C# 6 New Features

Collection of Roslyn tools https://visualstudiogallery.msdn.microsoft.com/a4445ad0-f97c-41f9-a148-eae225dcc8a5

Recommends new features for you

Old Way

New Way

Page 13: C# 6 New Features