Forwarded from عکس نگار
▪️CSharp 7.0 Hacks and Features
⏹The presentation talks about latest version of C# with context to next version of it.
⚪️Using Statements for Static Members in a nutshell
using System.Console;
using System.Math;
class Program
{
static void Main(string[] args)
{
var angle = 90d;
WriteLine(Sin(angle));
}
}
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 Statements for Static Members in a nutshell
using System.Console;
using System.Math;
class Program
{
static void Main(string[] args)
{
var angle = 90d;
WriteLine(Sin(angle));
}
}
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 Statements for Static Members in a nutshell
using System.Console;
using System.Linq.Enumerable;
class Program
{
static void Main(string[] args)
{
foreach (var i in Range(0, 10))
WriteLine(i);
}
}
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 Statements for Static Members in a nutshell
using System.Console;
using System.Linq.Enumerable;
class Program
{
static void Main(string[] args)
{
foreach (var i in Range(0, 10))
WriteLine(i);
}
}
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.
⚪️Dictionary Initializers
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.
⚪️Dictionary Initializers
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.
⚪️Dictionary Initializers in a nutshell
var people = new Dictionary<string, Person>
{
[“abhishek"] = new Person()
};
var answers = new Dictionary<int, string>
{
[42] = "the answer to life the universe and everything"
};
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.
⚪️Dictionary Initializers in a nutshell
var people = new Dictionary<string, Person>
{
[“abhishek"] = new Person()
};
var answers = new Dictionary<int, string>
{
[42] = "the answer to life the universe and everything"
};
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.
⚪️Await inside Finallyblock
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.
⚪️Await inside Finallyblock
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.
⚪️Await + Finally in a nutshell
public async Task DownloadAsync()
{
try
{ }
catch
{
await Task.Delay
}
finally
{
await Task.Delay(2000);
}
}
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.
⚪️Await + Finally in a nutshell
public async Task DownloadAsync()
{
try
{ }
catch
{
await Task.Delay
}
finally
{
await Task.Delay(2000);
}
}
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.
⚪️Exception Filters
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.
⚪️Exception Filters
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.
⚪️Exception filters in a nutshell
try
{
throw new CustomException { Severity = 100 };
}
catch (CustomException ex) if (ex.Severity > 50)
{
Console.WriteLine("*BING BING* WARNING *BING BING*");
}
catch (CustomException ex)
{
Console.WriteLine("Whooops!");
}
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.
⚪️Exception filters in a nutshell
try
{
throw new CustomException { Severity = 100 };
}
catch (CustomException ex) if (ex.Severity > 50)
{
Console.WriteLine("*BING BING* WARNING *BING BING*");
}
catch (CustomException ex)
{
Console.WriteLine("Whooops!");
}
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.
⚪️Null Propagation
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.
⚪️Null Propagation
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.
⚪️Null propagation in a nutshell
class Person
{
public string Name { get; set; }
public Address Address { get; set; }
}
class Address
{
public string AddressLine1 { get; set; }
public string AddressLine2 { get; set; }
}
var abhishe = new Person
{
Name = “Abhishek"
};
Console.WriteLine(abhishek.Address.AddressLine1);
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.
⚪️Null propagation in a nutshell
class Person
{
public string Name { get; set; }
public Address Address { get; set; }
}
class Address
{
public string AddressLine1 { get; set; }
public string AddressLine2 { get; set; }
}
var abhishe = new Person
{
Name = “Abhishek"
};
Console.WriteLine(abhishek.Address.AddressLine1);
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.
⚪️Null propagation in a nutshell
class Person
{
public string Name { get; set; }
public Address Address { get; set; }
}
class Address
{
public string AddressLine1 { get; set; }
public string AddressLine2 { get; set; }
}
var abhishek = new Person
{
Name = “abhishek"
};
Console.WriteLine(abhishek.Address.AddressLine1);
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.
⚪️Null propagation in a nutshell
class Person
{
public string Name { get; set; }
public Address Address { get; set; }
}
class Address
{
public string AddressLine1 { get; set; }
public string AddressLine2 { get; set; }
}
var abhishek = new Person
{
Name = “abhishek"
};
Console.WriteLine(abhishek.Address.AddressLine1);
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.
⚪️Null propagation in a nutshell
class Person
{
public string Name { get; set; }
public Address Address { get; set; }
}
class Address
{
public string AddressLine1 { get; set; }
public string AddressLine2 { get; set; }
}
var abhishek = new Person
{
Name = “abhishek"
};
Console.WriteLine(abhishek.Address == null ? "No Address" : abhishek.Address.AddressLine1);
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.
⚪️Null propagation in a nutshell
class Person
{
public string Name { get; set; }
public Address Address { get; set; }
}
class Address
{
public string AddressLine1 { get; set; }
public string AddressLine2 { get; set; }
}
var abhishek = new Person
{
Name = “abhishek"
};
Console.WriteLine(abhishek.Address == null ? "No Address" : abhishek.Address.AddressLine1);
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.
⚪️Null propagation in a nutshell
class Person
{
public string Name { get; set; }
public Address Address { get; set; }
}
class Address
{
public string AddressLine1 { get; set; }
public string AddressLine2 { get; set; }
}
var abhishek = new Person
{
Name = “abhishek"
};
Console.WriteLine(abhishek.Address == null ? "No Address" : abhishek.Address.AddressLine1);
Console.WriteLine(abhishek?.Address?.AddressLine1 ?? "No Address");
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.
⚪️Null propagation in a nutshell
class Person
{
public string Name { get; set; }
public Address Address { get; set; }
}
class Address
{
public string AddressLine1 { get; set; }
public string AddressLine2 { get; set; }
}
var abhishek = new Person
{
Name = “abhishek"
};
Console.WriteLine(abhishek.Address == null ? "No Address" : abhishek.Address.AddressLine1);
Console.WriteLine(abhishek?.Address?.AddressLine1 ?? "No Address");
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.
⚪️Null propagation in a nutshell
var people = new[]
{
new Person(),
null
};
WriteLine(people[0]?.Name);
WriteLine(people[1]?.Name);
@ fekberg
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.
⚪️Null propagation in a nutshell
var people = new[]
{
new Person(),
null
};
WriteLine(people[0]?.Name);
WriteLine(people[1]?.Name);
@ fekberg
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.
⚪️Null propagation in a nutshell
Person[] people = null;
WriteLine(people?[0]?.Name);
Person[] people = null;
Console.WriteLine(
(people != null) ?
((people[0] == null) ? null : people[0].Name)
: null
);
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.
⚪️Null propagation in a nutshell
Person[] people = null;
WriteLine(people?[0]?.Name);
Person[] people = null;
Console.WriteLine(
(people != null) ?
((people[0] == null) ? null : people[0].Name)
: null
);
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.
⚪️Expression-bodied members
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.
⚪️Expression-bodied members
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.
⚪️Expression-bodied members in a nutshell
class Rectangle
{
public double Width { get; set; }
public double Height { get; set; }
public double Area => Width * Height;
}
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.
⚪️Expression-bodied members in a nutshell
class Rectangle
{
public double Width { get; set; }
public double Height { get; set; }
public double Area => Width * Height;
}
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.
⚪️Expression-bodied members in a nutshell
class Rectangle
{
public double Width { get; set; }
public double Height { get; set; }
public override string ToString() =>
"My Width is {Width} and my Height is {Height}";
}
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.
⚪️Expression-bodied members in a nutshell
class Rectangle
{
public double Width { get; set; }
public double Height { get; set; }
public override string ToString() =>
"My Width is {Width} and my Height is {Height}";
}
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.
⚪️String interpolation
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.
⚪️String interpolation
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.
⚪️String interpolation in a nutshell
public override string ToString() =>
"My Width is {Width} and my Height is {Height}";
Syntax will change in a later release to the following:
public override string ToString() =>
$"My Width is {Width} and my Height is {Height}";
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.
⚪️String interpolation in a nutshell
public override string ToString() =>
"My Width is {Width} and my Height is {Height}";
Syntax will change in a later release to the following:
public override string ToString() =>
$"My Width is {Width} and my Height is {Height}";
Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary
by @D4NTESPARDA
@ @ProgrammingLanguages