Forwarded from عکس نگار
▪️CSharp 7.0 Hacks and Features
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Inherent use of Tuples and language integration
(int x, int y) MyFunction(){
Console.WriteLine(“My Tuple is called”);
}
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Inherent use of Tuples and language integration
(int x, int y) MyFunction(){
Console.WriteLine(“My Tuple is called”);
}
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
Forwarded from عکس نگار
▪️CSharp 7.0 Hacks and Features
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Inherent use of Tuples and language integration
public class Person
{
public readonly (string firstName, string lastName) Names; // a tuple
public Person((string FirstName, string LastName)) names, int Age)
{
Names = names;
}
}
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Inherent use of Tuples and language integration
public class Person
{
public readonly (string firstName, string lastName) Names; // a tuple
public Person((string FirstName, string LastName)) names, int Age)
{
Names = names;
}
}
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
Forwarded from عکس نگار
▪️CSharp 7.0 Hacks and Features
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Inherent use of Tuples and language integration
(string first, string last) = GetNames("Inigo Montoya")
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Inherent use of Tuples and language integration
(string first, string last) = GetNames("Inigo Montoya")
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
Forwarded from عکس نگار
▪️CSharp 7.0 Hacks and Features
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Using params with IEnumerable
int Avg(params IEnumerable<int> numbers)
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Using params with IEnumerable
int Avg(params IEnumerable<int> numbers)
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
Forwarded from عکس نگار
▪️CSharp 7.0 Hacks and Features
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Declaration Expressions
public void CalculateAgeBasedOn(int birthYear, out int age)
{
age = DateTime.Now.Year - birthYear;
}
CalculateAgeBasedOn(1987, out var age);
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Declaration Expressions
public void CalculateAgeBasedOn(int birthYear, out int age)
{
age = DateTime.Now.Year - birthYear;
}
CalculateAgeBasedOn(1987, out var age);
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
Forwarded from عکس نگار
▪️CSharp 7.0 Hacks and Features
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Primary Constructors
class Person(string name, int age)
{
private string _name = name;
private int _age = age;
}
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Primary Constructors
class Person(string name, int age)
{
private string _name = name;
private int _age = age;
}
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
Forwarded from عکس نگار
▪️CSharp 7.0 Hacks and Features
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Pattern Matching
object obj;
// ...
switch(obj)
{
case 42:
// ...
case Color.Red:
// ...
case string s:
// ...
case Point(int x, 42) where (Y > 42):
// ...
case Point(490, 42): // fine
// ...
default:
// ...
}
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Pattern Matching
object obj;
// ...
switch(obj)
{
case 42:
// ...
case Color.Red:
// ...
case string s:
// ...
case Point(int x, 42) where (Y > 42):
// ...
case Point(490, 42): // fine
// ...
default:
// ...
}
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
Forwarded from عکس نگار
▪️CSharp 7.0 Hacks and Features
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Async Streams
⚪️ IAsyncEnumerable will also work withAwait. It has
MoveNextAsync and Current property like
IEnumerable, and you can call them
using foreach loops.
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Async Streams
⚪️ IAsyncEnumerable will also work withAwait. It has
MoveNextAsync and Current property like
IEnumerable, and you can call them
using foreach loops.
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
Forwarded from عکس نگار
▪️CSharp 7.0 Hacks and Features
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Async Streams
⚪️ Inherently thread-safe
⚪️ Makes it easier to use and reason about code
⚪️ Easier to parallelize your code
⚪️ Reference to immutable objects can be cached, as they won’t
change
public immutable class Point
{
public Point(int x, int y)
{
X = x;
Y = y;
}
public int X { get; }
public int Y { get; }
}
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Async Streams
⚪️ Inherently thread-safe
⚪️ Makes it easier to use and reason about code
⚪️ Easier to parallelize your code
⚪️ Reference to immutable objects can be cached, as they won’t
change
public immutable class Point
{
public Point(int x, int y)
{
X = x;
Y = y;
}
public int X { get; }
public int Y { get; }
}
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
Forwarded from عکس نگار
▪️CSharp 7.0 Hacks and Features
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Summary
⚪️ C# 6.0 is awesome
⚪️ There’s a lot of change in C# 6.0 • .NET Compiler Platform
("Roslyn") makes it easy for Microsoft to improve the language
⚪️ There’s a lot of interesting features that could go in C# 7.0
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Summary
⚪️ C# 6.0 is awesome
⚪️ There’s a lot of change in C# 6.0 • .NET Compiler Platform
("Roslyn") makes it easy for Microsoft to improve the language
⚪️ There’s a lot of interesting features that could go in C# 7.0
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages