SlideShare a Scribd company logo
NetPonto - The Future Of C# - NetConf Edition
NetPonto - The Future Of C# - NetConf Edition
Paulo Morgado
• PauloMorgado.NET
• @PauloMorgado
• github.com/paulomorgado
• stackoverflow.com/users/402366/paulo-morgado
• slideshare.net/PauloJorgeMorgado
• www.facebook.com/paulomorgado.net
• revista-programar.info/author/pmorgado/
• luisabreu.github.io/csharp7pt/
• www.fca.pt/pt/catalogo-
pesquisa/?filtros=2&q=Paulo+Morgado
static async Task Main(string[] args)
{
int[] numbers = { 0b1, 0b10, 0b100, 0b1000, 0b1_0000, 0b10_0000 };
int result = await SumOfSquaresAsync(numbers);
WriteLine(result);
}
static Task<int> SumOfSquaresAsync(int[] numbers)
=> Task.FromResult(numbers.Select(i => i * i).Sum());
static async Task<int> Main(string[] args)
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-1#async-main
https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.1/async-main.md
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-1#default-literal-expressions
https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.1/target-typed-default.md
int result = await SumOfSquaresAsync(numbers, default(CancellationToken));int result = await SumOfSquaresAsync(numbers, default);
int count = 5;
string label = "Colors used in the map";
var pair = (count: count, label: label);
int count = 5;
string label = "Colors used in the map";
var pair = (count, label); // element names are "count" and "label"
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-1#inferred-tuple-element-names
https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.1/infer-tuple-names.md
/refout /refonly
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-1#async-main
https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.1/async-main.md
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-2#non-trailing-named-arguments
https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.2/non-trailing-named-arguments.md
void M(int arg1, string arg2, bool arg3 = false);
M(1, arg2: "s", true); // valid in C# 7.3
M(arg2: "s", 0); // not valid
M(arg2: "s", 0, arg3: true); // not valid
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-2#leading-underscores-in-numeric-literals
https://github.com/dotnet/roslyn/pull/20449
var b = 0b_1111_0000;
var h = 0x_FF_00;
ref T Choice<T>(bool condition, ref T consequence, ref T alternative)
{
if (condition)
{
return ref consequence;
}
else
{
return ref alternative;
}
}
https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.2/conditional-ref.md
ref T Choice<T>(bool condition, ref T consequence, ref T alternative)
{
return ref condition ? ref consequence : ref alternative;
}
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-2#private-protected-access-modifier
https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.2/private-protected.md
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-2#reference-semantics-with-value-types
https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.2/readonly-ref.md
// initialization
ref VeryLargeStruct refLocal = ref veryLargeStruct;
// reassigned, refLocal refers to different storage.
refLocal = ref anotherVeryLargeStruct;
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-3#ref-local-variables-may-be-reassigned
void M!<D>(D d) where D : Delegate { }
void M2<E>(E e) where E : Enum { }
unsafe void M3<T>(T *p) where T : unmanaged { }
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-3#enhanced-generic-constraints
var tuple = ("", 10);
if (tuple == ("", 10)) // true
if (("", 10) == (null, 5.2)) // false
if (("", 1, true) == (false, 5))
/*
Error CS8384
Tuple types used as operands of an == or != operator must have matching
cardinalities. But this operator has tuple types of cardinality 3 on the left
and 2 on the right.
*/
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-3#tuples-support--and-
https://github.com/dotnet/csharplang/issues/190
public class B
{
public B(int i, out int j) => j = i;
}
public class D : B
{
public D(int i) : base(i, out var j)
{
WriteLine($"The value of 'j' is {j}");
}
}
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-3#extend-expression-variables-in-initializers
https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.3/expression-variables-in-initializers.md
[field: SomeThingAboutFieldAttribute]
public int SomeProperty { get; set; }
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-3#attach-attributes-to-the-backing-fields-for-auto-implemented-properties
https://github.com/dotnet/csharplang/issues/42
int* pArr = stackalloc int[3] { 1, 2, 3 };
int* pArr2 = stackalloc int[] { 1, 2, 3 };
Span<int> arr = stackalloc[] { 1, 2, 3 };
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-3#stackalloc-arrays-support-initializers
https://github.com/dotnet/csharplang/issues/1286
unsafe struct S
{
public fixed int myFixedField[10];
}
class C
{
static S s = new S();
unsafe public void M()
{
fixed (int* ptr = s.myFixedField)
{
int p = ptr[5];
}
}
}
unsafe struct S
{
public fixed int myFixedField[10];
}
class C
{
static S s = new S();
unsafe public void M()
{
int p = s.myFixedField[5];
}
}
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-3#indexing-fixed-fields-does-not-require-pinning
https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.3/indexing-movable-fixed-fields.md
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-3#more-types-support-the-fixed-statement
https://github.com/dotnet/csharplang/issues/1314
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-3#improved-overload-candidates
https://github.com/dotnet/csharplang/issues/98
https://github.com/dotnet/csharplang/blob/master/proposals/nullable-reference-types.md
string? n = "world";
var x = b ? "Hello" : n; // string?
var y = b ? "Hello" : null; // string? or error
var z = b ? 7 : null; // Error today, could be int?
https://github.com/dotnet/roslyn/blob/features/range/docs/features/range.md
var slice = array[4..10];
switch (x)
{
case 0..10:
break;
}
foreach (var i in 0..10)
{
WriteLine(string.Join(",", (0..i).Select(j => i * j)));
}
https://github.com/dotnet/csharplang/blob/master/proposals/patterns.md
static string M(Person person)
{
return person switch
{
Professor (_, var ln, var s) =>
$"Dr. {ln}, Professor of {s}",
Student (var fn, _, var (_, ln, _)) =>
$"{fn}, Student of Dr. {ln}",
{ LastName: "Campbell", FirstName: var fn } =>
$"Please, enroll, {fn}",
_ =>
"Come back next year!"
};
}
https://github.com/dotnet/csharplang/blob/master/proposals/async-streams.md#iasyncdisposable
public interface IAsyncDisposable
{
Task DisposeAsync();
}
https://github.com/dotnet/csharplang/blob/master/proposals/async-streams.md#iasyncenumerable--iasyncenumerator
public interface IAsyncEnumerable<out T>
{
IAsyncEnumerator<T> GetAsyncEnumerator();
}
public interface IAsyncEnumerator<out T>
{
Task<bool> WaitForNextAsync();
T TryGetNext(out bool success);
}
interface ILogger
{
void Log(LogLevel level, string message);
}
class ConsoleLogger : ILogger
{
// send message
public void Log(LogLevel level, string message) { }
}
https://github.com/dotnet/csharplang/blob/master/proposals/default-interface-methods.md
interface ILogger
{
void Log(LogLevel level, string message);
void Log(Exception ex) => Log(LogLevel.Error, ex.ToString());
}
class ConsoleLogger : ILogger
{
// send message
public void Log(LogLevel level, string message) { }
}
https://github.com/dotnet/csharplang/blob/master/proposals/default-interface-methods.md
interface ILogger
{
void Log(LogLevel level, string message);
void Log(Exception ex) => Log(LogLevel.Error, ex.ToString());
}
class TelemetryLogger : ILogger
{
// send message
public void Log(LogLevel level, string message) { }
// capture crash dump and send message
public void Log(Exception ex) { }
}
class Person(string First, string Last);
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);
…
}
https://docs.microsoft.com/en-us/dotnet/csharp/
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/
https://github.com/dotnet/roslyn/blob/master/docs/Language%20Feature%20Status.md
https://github.com/dotnet/csharplang/
https://github.com/dotnet/roslyn
https://github.com/dotnet/csharplang/wiki
https://github.com/dotnet/csharplang/wiki/vNext-Preview
https://github.com/dotnet/csharplang/wiki/Nullable-Reference-Types-Preview
https://channel9.msdn.com/events/Build/2018/BRK2155
https://channel9.msdn.com/Events/dotnetConf/2018/S103
https://visualstudio.microsoft.com/vs/
https://code.visualstudio.com/
http://www.linqpad.net/
https://roslynpad.net/
https://sharplab.io/
https://github.com/paulomorgado/TugaIT-2018-Demos
https://github.com/paulomorgado/TugaIT-2018-FutureDemos-Nullable
https://github.com/paulomorgado/TugaIT-2018-FutureDemos-Goodies
@farfetch https://www.farfetch.com/
NetPonto - The Future Of C# - NetConf Edition
NetPonto - The Future Of C# - NetConf Edition
* Para quem não puder preencher durante a reunião,
iremos enviar um email com o link à tarde
15/09/2018 – Lisboa
24/11/2018 – Lisboa
Reserva estes dias na agenda! :)

More Related Content

PPTX
Tuga IT 2018 Summer Edition - The Future of C#
PPT
The bytecode hocus pocus - JavaOne 2016
PPT
The bytecode mumbo-jumbo
PDF
(ThoughtWorks Away Day 2009) one or two things you may not know about typesys...
ZIP
Lisp Macros in 20 Minutes (Featuring Clojure)
PDF
Python Performance 101
PDF
Using Flow-based programming to write tools and workflows for Scientific Comp...
PPT
Whats new in_csharp4
Tuga IT 2018 Summer Edition - The Future of C#
The bytecode hocus pocus - JavaOne 2016
The bytecode mumbo-jumbo
(ThoughtWorks Away Day 2009) one or two things you may not know about typesys...
Lisp Macros in 20 Minutes (Featuring Clojure)
Python Performance 101
Using Flow-based programming to write tools and workflows for Scientific Comp...
Whats new in_csharp4

What's hot (20)

PDF
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
PDF
Empty Base Class Optimisation, [[no_unique_address]] and other C++20 Attributes
PDF
NodeUkraine - Postgresql для хипстеров или почему ваш следующий проект должен...
PPTX
Hacking Go Compiler Internals / GoCon 2014 Autumn
PPT
Euro python2011 High Performance Python
PDF
JavaScript 2016 for C# Developers
PDF
«iPython & Jupyter: 4 fun & profit», Лев Тонких, Rambler&Co
PPTX
Let's talks about string operations in C++17
PDF
Don't do this
PDF
미려한 UI/UX를 위한 여정
PPSX
Tuga it 2016 - What's New In C# 6
PDF
A swift introduction to Swift
PDF
Justjava 2007 Arquitetura Java EE Paulo Silveira, Phillip Calçado
DOCX
CBSE Computer Project for Class 12 ( C++)
PPSX
What's new in C# 6 - NetPonto Porto 20160116
PDF
The present and the future of functional programming in c++
PDF
Introduction to Swift programming language.
PDF
Funkcija, objekt, python
PDF
Lambdas and Streams Master Class Part 2
PDF
JavaScript ES6
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
Empty Base Class Optimisation, [[no_unique_address]] and other C++20 Attributes
NodeUkraine - Postgresql для хипстеров или почему ваш следующий проект должен...
Hacking Go Compiler Internals / GoCon 2014 Autumn
Euro python2011 High Performance Python
JavaScript 2016 for C# Developers
«iPython & Jupyter: 4 fun & profit», Лев Тонких, Rambler&Co
Let's talks about string operations in C++17
Don't do this
미려한 UI/UX를 위한 여정
Tuga it 2016 - What's New In C# 6
A swift introduction to Swift
Justjava 2007 Arquitetura Java EE Paulo Silveira, Phillip Calçado
CBSE Computer Project for Class 12 ( C++)
What's new in C# 6 - NetPonto Porto 20160116
The present and the future of functional programming in c++
Introduction to Swift programming language.
Funkcija, objekt, python
Lambdas and Streams Master Class Part 2
JavaScript ES6
Ad

Similar to NetPonto - The Future Of C# - NetConf Edition (20)

PPTX
Novidades do c# 7 e 8
PDF
Refactoring to Macros with Clojure
PDF
Presto anatomy
PDF
TDC2018SP | Trilha .Net - Novidades do C# 7 e 8
PDF
Доклад Антона Поварова "Go in Badoo" с Golang Meetup
PDF
掀起 Swift 的面紗
PDF
Advanced Debugging Using Java Bytecodes
PDF
VTU DSA Lab Manual
PPTX
Groovy
PDF
Дмитрий Верескун «Синтаксический сахар C#»
PDF
.gradle 파일 정독해보기
PDF
ClojureScript loves React, DomCode May 26 2015
PDF
Community-driven Language Design at TC39 on the JavaScript Pipeline Operator ...
PDF
All I know about rsc.io/c2go
PPTX
golang_getting_started.pptx
PDF
[245] presto 내부구조 파헤치기
PDF
Static types on javascript?! Type checking approaches to ensure healthy appli...
PDF
A Recovering Java Developer Learns to Go
PDF
Kirk Shoop, Reactive programming in C++
PDF
Scala is java8.next()
Novidades do c# 7 e 8
Refactoring to Macros with Clojure
Presto anatomy
TDC2018SP | Trilha .Net - Novidades do C# 7 e 8
Доклад Антона Поварова "Go in Badoo" с Golang Meetup
掀起 Swift 的面紗
Advanced Debugging Using Java Bytecodes
VTU DSA Lab Manual
Groovy
Дмитрий Верескун «Синтаксический сахар C#»
.gradle 파일 정독해보기
ClojureScript loves React, DomCode May 26 2015
Community-driven Language Design at TC39 on the JavaScript Pipeline Operator ...
All I know about rsc.io/c2go
golang_getting_started.pptx
[245] presto 내부구조 파헤치기
Static types on javascript?! Type checking approaches to ensure healthy appli...
A Recovering Java Developer Learns to Go
Kirk Shoop, Reactive programming in C++
Scala is java8.next()
Ad

More from Paulo Morgado (13)

PPSX
Tuga IT 2017 - What's new in C# 7
PPSX
What's New In C# 7
PPSX
await Xamarin @ PTXug
PPSX
MVP Showcase 2015 - C#
PPSX
Roslyn analyzers: File->New->Project
PPSX
Async-await best practices in 10 minutes
PPSX
C# 6.0 - April 2014 preview
PPSX
What’s New In C# 5.0 - iseltech'13
PPSX
What's New In C# 5.0 - Programar 2013
PPSX
What's new in c# 5.0 net ponto
PPTX
What's New In C# 5.0 - Rumos InsideOut
PPTX
Whats New In C# 4 0 - NetPonto
PPTX
As Novidades Do C# 4.0 - NetPonto
Tuga IT 2017 - What's new in C# 7
What's New In C# 7
await Xamarin @ PTXug
MVP Showcase 2015 - C#
Roslyn analyzers: File->New->Project
Async-await best practices in 10 minutes
C# 6.0 - April 2014 preview
What’s New In C# 5.0 - iseltech'13
What's New In C# 5.0 - Programar 2013
What's new in c# 5.0 net ponto
What's New In C# 5.0 - Rumos InsideOut
Whats New In C# 4 0 - NetPonto
As Novidades Do C# 4.0 - NetPonto

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Cloud computing and distributed systems.
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Spectroscopy.pptx food analysis technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Encapsulation theory and applications.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Approach and Philosophy of On baking technology
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
KodekX | Application Modernization Development
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Cloud computing and distributed systems.
NewMind AI Weekly Chronicles - August'25 Week I
Understanding_Digital_Forensics_Presentation.pptx
Spectroscopy.pptx food analysis technology
“AI and Expert System Decision Support & Business Intelligence Systems”
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Encapsulation theory and applications.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Approach and Philosophy of On baking technology
Review of recent advances in non-invasive hemoglobin estimation
Dropbox Q2 2025 Financial Results & Investor Presentation
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
KodekX | Application Modernization Development
Advanced methodologies resolving dimensionality complications for autism neur...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
The AUB Centre for AI in Media Proposal.docx
Digital-Transformation-Roadmap-for-Companies.pptx

NetPonto - The Future Of C# - NetConf Edition

Editor's Notes

  • #38: Telerik Ndepend Pluralsight syncfusion
  • #40: Para quem puder ir preenchendo, assim não chateio mais logo  É importante para recebermos nós feedback, e para darmos feedback aos nossos oradores http://goqr.me/