Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Build 2017 - B8104 - The Future of C#

1,072 views

Published on

We’re back! With C# 7.0 and Visual Studio 2017 just recently shipped, we paint the big picture: let’s lay out where the C# language and tooling experience is headed, and show early glimpses of what we’re currently working on.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Build 2017 - B8104 - The Future of C#

  1. 1. @MadsTorgersen, @dcampbell
  2. 2. stackoverflow.com/insights/survey/2017#most-popular-technologies
  3. 3. stackoverflow.com/insights/survey/2017#most-loved-dreaded-and-wanted
  4. 4. F# 10,000’s Tens of thousands VB 100,000’s Hundreds of thousands C# 1,000,000’s Millions
  5. 5. F# 10,000’s Tens of thousands VB 100,000’s Hundreds of thousands C# 1,000,000’s Millions
  6. 6. F# 10,000’s Tens of thousands VB 100,000’s Hundreds of thousands C# 1,000,000’s Millions
  7. 7. F# 10,000’s Tens of thousands VB 100,000’s Hundreds of thousands C# 1,000,000’s Millions
  8. 8. Demos! More demos!
  9. 9. IAsyncEnumerable<Person> people = database.GetPeopleAsync(); foreach await (var p in people) { … } using await (IAsyncDisposable resource = await store.GetRecordAsync(…)) { … }
  10. 10. extension Enrollee extends Person { // static field static Dictionary<Person, Professor> enrollees = new Dictionary<Person, Professor>(); // instance method public void Enroll(Professor supervisor) { enrollees[this] = supervisor; } // instance property public Professor Supervisor => enrollees.TryGetValue(this, out var supervisor) ? supervisor : null; // static property public static ICollection<Person> Students => enrollees.Keys; // instance constructor public Person(string name, Professor supervisor) : this(name) { this.Enroll(supervisor); } }
  11. 11. class Person : IEquatable<Person> { public string First { get; } public string Last { get; } public Person(string First, string Last) => (this.First, this.Last) = (First, Last); public void Deconstruct(out string First, out string Last) => (First, Last) = (this.First, this.Last); public bool Equals(Person other) => other != null && First == other.First && Last == other.Last; public override bool Equals(object obj) => obj is Person other ? Equals(other) : false; public override int GetHashCode() => GreatHashFunction(First, Last); … } class Person(string First, string Last);
  12. 12. @roslyn @dcampbell @MadsTorgersen

×