Developer Productivity: What’s New in C# 6 Bill Wagner | Author, Consultant Anthony D. Green | Managed Languages Program Manager
Meet Bill Wagner | @billwagner Author Effective C# More Effective C# Passion for informing and inspiring software developers to write better code be more productive www.thebillwagner.com www.github.com/BillWagner
Meet Anthony D. Green Microsoft Program Manager Focus on Language APIs Managed Languages Team Focus on Language APIs Syntactic and semantic analysis tools Diagnostics and Refactorings
Developer Productivity: What's New in C# 6 Getting Started with PowerShell 01 | C# features add productivity and conciseness 02 | Data Transfer Object Enhancements 03 | Handling Strings More Easily 04 | Exceptions and Error Handling Improvements 05 | Adopting C# 6
02 | Support for Data Transfer Objects Bill Wagner | Author, Consultant Anthony D. Green | Managed Languages Program Manager
Module Overview Read only Properties Dictionary Initializers
Data Transfer Object Support Key | Distributed Apps require Data Transfer Object types Key | Behavior and Data Storage are Separated Key | Minimize Ceremony for Data Transfer Objects
Features for Data Transfer Objects public class Point { public Point(double x, double y) X = x; Y = y; } public double X { get; } public double Y { get; } var webErrors = new Dictionary<int, string> { [404] = "Page not Found", [302] = "Page moved, but left a forwarding address.", [500] = "The web server can't come out to play today." };
Read only Properties
https://github.com/BillWagner/MVA-CSharp6 Read only Properties demo https://github.com/BillWagner/MVA-CSharp6 Read only Properties
Dictionary Initializers
https://github.com/BillWagner/MVA-CSharp6 Dictionary Initializers demo https://github.com/BillWagner/MVA-CSharp6 Dictionary Initializers
Features for Data Transfer Objects public class Point { public Point(double x, double y) X = x; Y = y; } public double X { get; } public double Y { get; } var webErrors = new Dictionary<int, string> { [404] = "Page not Found", [302] = "Page moved, but left a forwarding address.", [500] = "The web server can't come out to play today." };