build 2017 - b8104 - the future of c#
TRANSCRIPT
![Page 1: Build 2017 - B8104 - The Future of C#](https://reader031.vdocuments.mx/reader031/viewer/2022030317/5a65244d7f8b9a5b558b47b1/html5/thumbnails/1.jpg)
![Page 2: Build 2017 - B8104 - The Future of C#](https://reader031.vdocuments.mx/reader031/viewer/2022030317/5a65244d7f8b9a5b558b47b1/html5/thumbnails/2.jpg)
@MadsTorgersen, @dcampbell
![Page 3: Build 2017 - B8104 - The Future of C#](https://reader031.vdocuments.mx/reader031/viewer/2022030317/5a65244d7f8b9a5b558b47b1/html5/thumbnails/3.jpg)
stackoverflow.com/insights/survey/2017#most-popular-technologies
![Page 4: Build 2017 - B8104 - The Future of C#](https://reader031.vdocuments.mx/reader031/viewer/2022030317/5a65244d7f8b9a5b558b47b1/html5/thumbnails/4.jpg)
stackoverflow.com/insights/survey/2017#most-loved-dreaded-and-wanted
![Page 5: Build 2017 - B8104 - The Future of C#](https://reader031.vdocuments.mx/reader031/viewer/2022030317/5a65244d7f8b9a5b558b47b1/html5/thumbnails/5.jpg)
F#10,000’sTens of thousands
VB100,000’sHundreds of thousands
C#1,000,000’sMillions
![Page 6: Build 2017 - B8104 - The Future of C#](https://reader031.vdocuments.mx/reader031/viewer/2022030317/5a65244d7f8b9a5b558b47b1/html5/thumbnails/6.jpg)
F#10,000’sTens of thousands
VB100,000’sHundreds of thousands
C#1,000,000’sMillions
![Page 7: Build 2017 - B8104 - The Future of C#](https://reader031.vdocuments.mx/reader031/viewer/2022030317/5a65244d7f8b9a5b558b47b1/html5/thumbnails/7.jpg)
F#10,000’sTens of thousands
VB100,000’sHundreds of thousands
C#1,000,000’sMillions
![Page 8: Build 2017 - B8104 - The Future of C#](https://reader031.vdocuments.mx/reader031/viewer/2022030317/5a65244d7f8b9a5b558b47b1/html5/thumbnails/8.jpg)
F#10,000’sTens of thousands
VB100,000’sHundreds of thousands
C#1,000,000’sMillions
![Page 9: Build 2017 - B8104 - The Future of C#](https://reader031.vdocuments.mx/reader031/viewer/2022030317/5a65244d7f8b9a5b558b47b1/html5/thumbnails/9.jpg)
Demos!
More demos!
![Page 10: Build 2017 - B8104 - The Future of C#](https://reader031.vdocuments.mx/reader031/viewer/2022030317/5a65244d7f8b9a5b558b47b1/html5/thumbnails/10.jpg)
IAsyncEnumerable<Person> people = database.GetPeopleAsync();
foreach await (var p in people) { … }
using await (IAsyncDisposable resource = await store.GetRecordAsync(…)) { … }
![Page 11: Build 2017 - B8104 - The Future of C#](https://reader031.vdocuments.mx/reader031/viewer/2022030317/5a65244d7f8b9a5b558b47b1/html5/thumbnails/11.jpg)
extension Enrollee extends Person{
// static fieldstatic Dictionary<Person, Professor> enrollees = new Dictionary<Person, Professor>();
// instance methodpublic void Enroll(Professor supervisor) { enrollees[this] = supervisor; }
// instance propertypublic Professor Supervisor => enrollees.TryGetValue(this, out var supervisor) ? supervisor : null;
// static propertypublic static ICollection<Person> Students => enrollees.Keys;
// instance constructorpublic Person(string name, Professor supervisor) : this(name) { this.Enroll(supervisor); }
}
![Page 12: Build 2017 - B8104 - The Future of C#](https://reader031.vdocuments.mx/reader031/viewer/2022030317/5a65244d7f8b9a5b558b47b1/html5/thumbnails/12.jpg)
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);
![Page 13: Build 2017 - B8104 - The Future of C#](https://reader031.vdocuments.mx/reader031/viewer/2022030317/5a65244d7f8b9a5b558b47b1/html5/thumbnails/13.jpg)
![Page 14: Build 2017 - B8104 - The Future of C#](https://reader031.vdocuments.mx/reader031/viewer/2022030317/5a65244d7f8b9a5b558b47b1/html5/thumbnails/14.jpg)
@roslyn @dcampbell @MadsTorgersen
![Page 15: Build 2017 - B8104 - The Future of C#](https://reader031.vdocuments.mx/reader031/viewer/2022030317/5a65244d7f8b9a5b558b47b1/html5/thumbnails/15.jpg)