Programming languages
135 subscribers
202 photos
36 videos
49 files
249 links
A channel about all kind of programming languages, and their architectures and concepts.
Download Telegram
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
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
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
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
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
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
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
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
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
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
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
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
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
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}";

public override string ToString()
{
object[] args = new object[] { this.Width, this.Height };
return string.Format("My Width is {0} and my Height is {1}", args);
}

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

int age = 28;
var result = "Hello there, I'm {age : D5} years
WriteLine(result);

int num = 28;
object[] objArray1 = new object[] { num };
Console.WriteLine(string.Format("Hello there, I'm {0:D5} years old!", objArray1));

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.

⚪️nameof operator

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.

⚪️nameof operator in a nutshell

static void Main(string[] args)
{
WriteLine("Parameter name is: {nameof(args)}");
}

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.

⚪️nameof operator in a nutshell

public double CalculateArea(int width, int height)
{
if (width <= 0)
{
throw new ArgumentException("Parameter {nameof(width)} cannot be less than
}
return 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.

⚪️There’s more?? C#7.0


Ref: slideshare.net
#WroteBy <Abhishek Sur>
#Date <30 May 2016>
#ProgrammingLanguage
#Microsoft
#DotNeT
#CSharp
#CSharp7
#SlideShare
#Summary

by @D4NTESPARDA
@ @ProgrammingLanguages
Forwarded from j.ghadiri