What's new with .NET Core 3 - covering features from C#, .NET Core, ASP.NET Core, WPF - including nullability, indices and ranges, switch expressions, enhanced pattern matching, changes with ASP.NET Core, Blazor server-side components, and WPF with .NET Core.
6. Smaller C# 8 Features
using declaration
switch expression
more pattern matching
7. C# 8 – Async Streams
Before C# 8, await could be used to wait for a single
result
IAsyncDisposable, IAsyncEnumerable,
IAsyncEnumerator
foreach and yield extended with async semantics
8. C# 8 – Indices
and Ranges
• Span<T> allows reference a memory sequence
• Safe code, fast access, no object copy
• .NET Core 2.2 method overloads with spans
• Use C# 8 Ranges to access arrays, strings…
• .NET Core 3.0 faster, e.g. JSonDocument,
Utf8JsonReader, UTF8JsonWriter
9. C# 8 –
Nullable
Reference
Types
• Reference Types are not nullable anymore
• Get rid of NullReferenceException
• Breaking change
• Opt-in (project, code regions)
10. Nullability
Annotation Guidance
• .NET Core annotation in progress
• Do annotate all new APIs
• Consider changing the contracts if there's a
different de facto use
• Do continue to validate arguments
• Do not remove existing argument validation
• Avoid making changes while annotating
unless it's a bug fix
• some?.Method()
• https://github.com/dotnet/corefx/blob/ma
ster/Documentation/api-
guidelines/nullability.md
13. ASP.NET Core
3
• Generic host in Templates
• Service configuration simplified
• Endpoint Routing
• SignalR Client-to-Server Streaming
• JSON Serialization
• Worker Service Template
• gRPC Template
14. Blazor
• Components for the Web
• Based on Syntax of Razor Pages
• Client-Side Components make use of
WebAssembly
• Server-Side Components communicate via SignalR
• Server-Side Components released with .NET Core 3
• Client-Side Components released with a later .NET
Core 3 version
16. WPF (.NET
Framework) &
Windows
Runtime
WPF App
• Use Some Windows Runtime APIs
Packaging (Desktop Bridge)
• Use more Windows Runtime APIs
App-Service WPF – UWP
• Desktop Bridge & App Service
• Use all Windows Runtime APIs
17. XAML Islands
UWP Controls for WPF & Windows Forms
Wrappers for Ink, Map, Media
Create your own!
Windows Community Tookit
18. WPF & .NET
Core
New Project File
All C# 8 & .NET Core Features
Use the Windows Runtime
Side-by-side Runtime
Self-contained Exes
22. Actions
• Use C# 8
• Annotate your applications & libraries
• Use .NET Core 3
• Prepare for ASP.NET Core 3
• Be open for new application models
• Use the portability analyzer for WPF
• WPF & .NET Core
• https://github.com/christiannagel
• https://csharp.christiannagel.com
• https://docs.microsoft.com
• https://github.com/windows-toolkit/
• https://github.com/dotnet/
25. The European SharePoint, Office 365 & Azure Conference
4 Days 2,500 Delegates 150+ Sessions 120 Speakers
Microsoft Azure Keynote, 40 Azure Sessions, Azure Full Day Tutorials, Expert Global
Azure Speakers
Use code GABLz for 10% discount on all tickets
www.sharepointeurope.com