SlideShare a Scribd company logo
The State of C#
What Have I Missed?
Filip Ekberg
Microsoft MVP
@fekberg
Filip Ekberg
The Best of All Worlds – C#
C# 2.0
Generics
Partial types
Anonymous methods
Iterators
Nullable types
Getter/Setter separate accessibility
Static classes
And more..
Implicitly typed local variables
Object and collection initializers
Auto-properties
Anonymous types
Extension methods
Query expressions
Lambda expressions
Expression trees
And more..
Dynamic binding
Named and optional parameters
Generic co- and contravariance
And more..
C# 3.0 C# 4.0
Asynchronous methods
Caller info attributes
C# 5.0
No more
Language Parity
C# 6.0
Using Statements for Static Members
Auto-Property Initializers
Await inside Catch & Finally blocks
Null-conditional operators
String interpolation
Dictionary Initializers
Expression-bodied members
Exception Filters
nameof operator
C# 7.0
Tuples and Deconstruction
Pattern Matching
Digit Separator & Binary Literals
Local Functions
ref returns
out improvements
C# 8?
C# 7.1
Async Main
Default Expressions
Infer Tuple Names
Pattern-matching with Generics
Ref Assemblies
C# 7.2
ref readonly
public ref readonly T RefAt(int i)
Vector3 Add (in Vector3 v1, in Vector3 v2)
non-trailing named arguments
DoSomething(isEmployed:true, name, age);
private protected
CLR protectedAndInternal = private protected
conditional ref operator
<condition> ? ref <consequence> : ref <alternative>
digit separator after base specifier
0x_1_2
C# 8.0
Record Types
Default interface methods
Nullable reference type
Null coalescing assignment
Recursive patterns (+ Pattern Matching Improvements)
Negated-condition if statement
Null-conditional await
And More!!
Null Reference Exceptions
C#Record Types
public class Triangle : Shape
{
public int A { get; set; }
public int B { get; set; }
public int C { get; set; }
}
public class Triangle(int A, int B, int C )
: Shape {}
C#Default interface methods
interface IPoint
{
(int x, int y) GetPoint() { return (0, 0); }
}
class Point : IPoint
{ }
IPoint point = new Point();
point.GetPoint();
C#Nullable reference type
Point? point = new Point();
Point? point = null; // Boom?!
C#Null coalescing assignment
x = x ?? y
if(x == null) x = y;
x ??= y
C#Negated-condition if statement
if( !(shape is Triangle)) {};
if(shape is not Triangle) {};
if!(shape is Triangle) {};
unless (shape is Triangle) {};
C#Null-conditional await
(task == null) ? null : await task
await! task
Wrap Up
I’m Filip Ekberg
@fekberg
Thanks!

More Related Content

What's hot (20)

Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Syntax analysis
Syntax analysisSyntax analysis
Syntax analysis
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Est 102 ppt1
Est 102 ppt1Est 102 ppt1
Est 102 ppt1
 
Parsing
ParsingParsing
Parsing
 
C# 8 e além
C# 8 e alémC# 8 e além
C# 8 e além
 
C++
C++C++
C++
 
Csharp4 basics
Csharp4 basicsCsharp4 basics
Csharp4 basics
 
Introduction of c programming unit-ii ppt
Introduction of  c programming unit-ii pptIntroduction of  c programming unit-ii ppt
Introduction of c programming unit-ii ppt
 
Algorithm Class- Python training in hyderabad, Python online training in hyde...
Algorithm Class- Python training in hyderabad, Python online training in hyde...Algorithm Class- Python training in hyderabad, Python online training in hyde...
Algorithm Class- Python training in hyderabad, Python online training in hyde...
 
Lexing and parsing
Lexing and parsingLexing and parsing
Lexing and parsing
 
Parser
ParserParser
Parser
 
5 introduction-to-c
5 introduction-to-c5 introduction-to-c
5 introduction-to-c
 
SD & D Types of programming language
SD & D Types of programming languageSD & D Types of programming language
SD & D Types of programming language
 
Chap1 language fondamentale of java ( scjp /ocjp)
Chap1 language fondamentale of java ( scjp /ocjp)Chap1 language fondamentale of java ( scjp /ocjp)
Chap1 language fondamentale of java ( scjp /ocjp)
 
Pigaios: A Tool for Diffing Source Codes against Binaries (Hacktivity 2018)
Pigaios: A Tool for Diffing Source Codes against Binaries (Hacktivity 2018)Pigaios: A Tool for Diffing Source Codes against Binaries (Hacktivity 2018)
Pigaios: A Tool for Diffing Source Codes against Binaries (Hacktivity 2018)
 
Introduction to W3C I18N Best Practices
Introduction to W3C I18N Best PracticesIntroduction to W3C I18N Best Practices
Introduction to W3C I18N Best Practices
 
Grade 11 CS Review (unit 1)
Grade 11 CS Review (unit 1)Grade 11 CS Review (unit 1)
Grade 11 CS Review (unit 1)
 
Computers for kids
Computers for kidsComputers for kids
Computers for kids
 

Similar to The State of C#

What's Coming in C# 9.0
What's Coming in C# 9.0What's Coming in C# 9.0
What's Coming in C# 9.0Moaid Hathot
 
Bracket Show Episode 35 - histoire de c# de 2002 à 2019
Bracket Show Episode 35 - histoire de c# de 2002 à 2019Bracket Show Episode 35 - histoire de c# de 2002 à 2019
Bracket Show Episode 35 - histoire de c# de 2002 à 2019Eric De Carufel
 
What's coming in c# 9.0
What's coming in c# 9.0What's coming in c# 9.0
What's coming in c# 9.0Moaid Hathot
 
What's New in C# ? C# 6, 7.0, 7.1 and 7.2
What's New in C# ? C# 6, 7.0, 7.1 and 7.2What's New in C# ? C# 6, 7.0, 7.1 and 7.2
What's New in C# ? C# 6, 7.0, 7.1 and 7.2David Stevenson
 
2.Getting Started with C#.Net-(C#)
2.Getting Started with C#.Net-(C#)2.Getting Started with C#.Net-(C#)
2.Getting Started with C#.Net-(C#)Shoaib Ghachi
 
Community Tech Days C# 4.0
Community Tech Days C# 4.0Community Tech Days C# 4.0
Community Tech Days C# 4.0SANKARSAN BOSE
 
Microsoft c#.net online training.ppsx
Microsoft c#.net online training.ppsxMicrosoft c#.net online training.ppsx
Microsoft c#.net online training.ppsxSanthosh Reddy
 
MICROSOFT C#.NET ONLINE TRAINING
MICROSOFT C#.NET ONLINE TRAININGMICROSOFT C#.NET ONLINE TRAINING
MICROSOFT C#.NET ONLINE TRAININGSanthosh Sap
 
Java Script Patterns
Java Script PatternsJava Script Patterns
Java Script PatternsAllan Huang
 
Resharper - Next Steps
Resharper - Next StepsResharper - Next Steps
Resharper - Next StepsTimmy Kokke
 
From delegates, to lamdas and expression trees your guide to elegant code in ...
From delegates, to lamdas and expression trees your guide to elegant code in ...From delegates, to lamdas and expression trees your guide to elegant code in ...
From delegates, to lamdas and expression trees your guide to elegant code in ...Credera
 
C#3.0 & Vb 9.0 Language Enhancments
C#3.0 & Vb 9.0 Language EnhancmentsC#3.0 & Vb 9.0 Language Enhancments
C#3.0 & Vb 9.0 Language Enhancmentstechfreak
 

Similar to The State of C# (20)

What's Coming in C# 9.0
What's Coming in C# 9.0What's Coming in C# 9.0
What's Coming in C# 9.0
 
Bracket Show Episode 35 - histoire de c# de 2002 à 2019
Bracket Show Episode 35 - histoire de c# de 2002 à 2019Bracket Show Episode 35 - histoire de c# de 2002 à 2019
Bracket Show Episode 35 - histoire de c# de 2002 à 2019
 
C# 7.X and beyond
C# 7.X and beyondC# 7.X and beyond
C# 7.X and beyond
 
What's coming in c# 9.0
What's coming in c# 9.0What's coming in c# 9.0
What's coming in c# 9.0
 
C# - Igor Ralić
C# - Igor RalićC# - Igor Ralić
C# - Igor Ralić
 
What's New in C# ? C# 6, 7.0, 7.1 and 7.2
What's New in C# ? C# 6, 7.0, 7.1 and 7.2What's New in C# ? C# 6, 7.0, 7.1 and 7.2
What's New in C# ? C# 6, 7.0, 7.1 and 7.2
 
csharp.docx
csharp.docxcsharp.docx
csharp.docx
 
2.Getting Started with C#.Net-(C#)
2.Getting Started with C#.Net-(C#)2.Getting Started with C#.Net-(C#)
2.Getting Started with C#.Net-(C#)
 
Cs30 New
Cs30 NewCs30 New
Cs30 New
 
C# language
C# languageC# language
C# language
 
Community Tech Days C# 4.0
Community Tech Days C# 4.0Community Tech Days C# 4.0
Community Tech Days C# 4.0
 
Microsoft c#.net online training.ppsx
Microsoft c#.net online training.ppsxMicrosoft c#.net online training.ppsx
Microsoft c#.net online training.ppsx
 
MICROSOFT C#.NET ONLINE TRAINING
MICROSOFT C#.NET ONLINE TRAININGMICROSOFT C#.NET ONLINE TRAINING
MICROSOFT C#.NET ONLINE TRAINING
 
C# 6.0 and 7.0 new features
C# 6.0 and 7.0 new featuresC# 6.0 and 7.0 new features
C# 6.0 and 7.0 new features
 
Deep Dive C# 8.0
Deep Dive C# 8.0Deep Dive C# 8.0
Deep Dive C# 8.0
 
C sharp
C sharpC sharp
C sharp
 
Java Script Patterns
Java Script PatternsJava Script Patterns
Java Script Patterns
 
Resharper - Next Steps
Resharper - Next StepsResharper - Next Steps
Resharper - Next Steps
 
From delegates, to lamdas and expression trees your guide to elegant code in ...
From delegates, to lamdas and expression trees your guide to elegant code in ...From delegates, to lamdas and expression trees your guide to elegant code in ...
From delegates, to lamdas and expression trees your guide to elegant code in ...
 
C#3.0 & Vb 9.0 Language Enhancments
C#3.0 & Vb 9.0 Language EnhancmentsC#3.0 & Vb 9.0 Language Enhancments
C#3.0 & Vb 9.0 Language Enhancments
 

More from Filip Ekberg

Building APIs with MVC 6 and OAuth
Building APIs with MVC 6 and OAuthBuilding APIs with MVC 6 and OAuth
Building APIs with MVC 6 and OAuthFilip Ekberg
 
No More Deadlocks; Asynchronous Programming in .NET
No More Deadlocks; Asynchronous Programming in .NETNo More Deadlocks; Asynchronous Programming in .NET
No More Deadlocks; Asynchronous Programming in .NETFilip Ekberg
 
Asynchronous programming from Xamarin Hakcday in Melbourne
Asynchronous programming from Xamarin Hakcday in MelbourneAsynchronous programming from Xamarin Hakcday in Melbourne
Asynchronous programming from Xamarin Hakcday in MelbourneFilip Ekberg
 
Asynchronous programming
Asynchronous programmingAsynchronous programming
Asynchronous programmingFilip Ekberg
 
Azure Mobile Services .NET Backend
Azure Mobile Services .NET BackendAzure Mobile Services .NET Backend
Azure Mobile Services .NET BackendFilip Ekberg
 
C# 6.0 - What?! C# is being updated?
C# 6.0 - What?! C# is being updated?C# 6.0 - What?! C# is being updated?
C# 6.0 - What?! C# is being updated?Filip Ekberg
 

More from Filip Ekberg (8)

C# 8 and Beyond
C# 8 and BeyondC# 8 and Beyond
C# 8 and Beyond
 
Building APIs with MVC 6 and OAuth
Building APIs with MVC 6 and OAuthBuilding APIs with MVC 6 and OAuth
Building APIs with MVC 6 and OAuth
 
C# Is The Future
C# Is The FutureC# Is The Future
C# Is The Future
 
No More Deadlocks; Asynchronous Programming in .NET
No More Deadlocks; Asynchronous Programming in .NETNo More Deadlocks; Asynchronous Programming in .NET
No More Deadlocks; Asynchronous Programming in .NET
 
Asynchronous programming from Xamarin Hakcday in Melbourne
Asynchronous programming from Xamarin Hakcday in MelbourneAsynchronous programming from Xamarin Hakcday in Melbourne
Asynchronous programming from Xamarin Hakcday in Melbourne
 
Asynchronous programming
Asynchronous programmingAsynchronous programming
Asynchronous programming
 
Azure Mobile Services .NET Backend
Azure Mobile Services .NET BackendAzure Mobile Services .NET Backend
Azure Mobile Services .NET Backend
 
C# 6.0 - What?! C# is being updated?
C# 6.0 - What?! C# is being updated?C# 6.0 - What?! C# is being updated?
C# 6.0 - What?! C# is being updated?
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1DianaGray10
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsVlad Stirbu
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»QADay
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...Elena Simperl
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesThousandEyes
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...Sri Ambati
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 

The State of C#