C Sharp: Difference between revisions
Jump to navigation
Jump to search
Created page with "=C# 8.0 and .Net Core 3.0= == Intro == Here is the history of C# * 2.0 included generics * 3.0 Added Linq with Lambda and anonymous types * 4.0 Added Dynamics * 5.0 Added Asyn..." |
|||
Line 20: | Line 20: | ||
==Nullable Reference Types== | ==Nullable Reference Types== | ||
This allows you to specify a possibility of null. e.g. | |||
<syntaxhighlight lang="C#"> | |||
class | |||
{ | |||
public string? Title {get; set;} | |||
public List<Comment> Title {get;} = new List<Comment>(); | |||
} | |||
</syntaxhighlight> | |||
Bad code is highlighted a compile time with CS8618 Non-nullable property and via intellisence | |||
==Pattern Matching== | ==Pattern Matching== | ||
==Indices and Ranges== | ==Indices and Ranges== |
Revision as of 00:43, 10 August 2020
C# 8.0 and .Net Core 3.0
Intro
Here is the history of C#
- 2.0 included generics
- 3.0 Added Linq with Lambda and anonymous types
- 4.0 Added Dynamics
- 5.0 Added Async and Await
- 6.0 Added Null propagating operator (targer?.IsActive ?? false;
- 7.0 Expressions and Tuples
C# 8.0 brings
- Nullable Reference Types
- Pattern Matching
- Indices and Ranges
- Built-in Json Support
- Windows Desktop Support
- Build and Deploy Improvements
- Other Language Improvements
- Other .NET Core Platform Improvements
Nullable Reference Types
This allows you to specify a possibility of null. e.g.
class
{
public string? Title {get; set;}
public List<Comment> Title {get;} = new List<Comment>();
}
Bad code is highlighted a compile time with CS8618 Non-nullable property and via intellisence