C# 2 to 5 short Introduction

14
C#2.0 to 5.0 BLACKIE 2015/3/6

Transcript of C# 2 to 5 short Introduction

Page 1: C# 2 to 5 short Introduction

C#2.0 to 5.0BLACKIE

2015/3/6

Page 2: C# 2 to 5 short Introduction

AGENDA

C#2 to C#5 Quick IntroMy favorite C#2 to C#5

Page 3: C# 2 to 5 short Introduction

.NET Framework versions

1.0 - released in 2002 1.1 - released in 2003 2.0 - released in 2005, with a new CLR (to handle generics and

nullable types) and compilers for C# 2 and VB 8. 3.0 - released in 2006, this is just 2.0 plus new libraries: Windows

Presentation Foundation, Windows Communication Foundation, Workflow Foundation, and Cardspace

3.5 - released in 2007, this is 3.0 plus new libraries (primarily LINQ and some extra "base" libraries such as TimeZoneInfo) and new compilers (for C# 3 and VB 9)

4 - released in 2010, this includes a new CLR (v4), new libraries, and the DLR (Dynamic Language Runtime)

4.5 - released in 2012, this allows for WinRT development on Windows 8 as well as extra libraries - with much wider async APIs

Page 4: C# 2 to 5 short Introduction

C# language versions

C# 1 C# 2, introducing generics, nullable types, anonymous

methods, iterator blocks and some other more minor features

C# 3, introducing implicit typing, object and collection initializers, anonymous types, automatic properties, lambda expressions, extension methods, query expressions and some other minor features

C# 4, introducing dynamic typing, optional parameters, named arguments, and generic variance

C# 5, introducing asynchronous functions, caller info attributes, and a tweak to foreach iteration variable capture

Page 5: C# 2 to 5 short Introduction

Visual Studio versions

VS.NET 2002 - support for C# 1 and .NET 1.0 VS.NET 2003 - support for C# 1 and .NET 1.1 VS 2005 - support for C# 2 and .NET 2.0, and .NET

3.0 with an extension VS 2008 - support for C# 3 and .NET 2.0, 3.0 and 3.5

(multi-targeting) VS 2010 - support for C# 4 and .NET 2.0, 3.0, 3.5 and

4 VS 2012 - support for C# 5 and .NET 2.0 to 4.5

(including WinRT on Windows 8), and portable class libraries

Page 6: C# 2 to 5 short Introduction
Page 7: C# 2 to 5 short Introduction

C# 3.0

Automatic properties

Anonymous Types

Page 8: C# 2 to 5 short Introduction

C#3.0

Extension methodshttp://www.dotblogs.com.tw/larrynung/archive/2009/07/26/9682.aspx Lambda Expressions

Linq&Plinqhttp://www.dotblogs.com.tw/nobel12/archive/2011/03/14/21828.aspx

Page 9: C# 2 to 5 short Introduction

C#4.0

Late Binding(Dynamic Lookup)http://www.dotblogs.com.tw/larrynung/archive/2009/08/05/9861.aspx Optional Parameters

Page 10: C# 2 to 5 short Introduction

C#4.0

Named Parameters

Page 11: C# 2 to 5 short Introduction

C#5.0

async and await

Page 12: C# 2 to 5 short Introduction

C#5.0

Caller Information

Page 13: C# 2 to 5 short Introduction

C#5.0

Caller Information