/csharp-seven

Test suite that describes new features in C# 7

Primary LanguageC#

New features in C# 7

Test suite of new features in C# 7

This repo contains a list of new features in C# 7. Examples are heavily influenced from StackOverflow documentation as well as this MSDN blog post.

Topics covered

Examples

Introduces object deconstruction, expression bodies and ValueTuples

class Person
{
	public string FirstName { get; set; }
	public string LastName { get; set; }
	public (string First, string Last) FullName => (FirstName, LastName);

	public void Deconstruct(out string first, out string last)
	{
		first = FirstName;
		last = LastName;
	}
}