Presentation is loading. Please wait.

Presentation is loading. Please wait.

C# Present and Future Marita Paletsou Software Engineer.

Similar presentations


Presentation on theme: "C# Present and Future Marita Paletsou Software Engineer."— Presentation transcript:

1 C# Present and Future Marita Paletsou Software Engineer

2 Agenta Brief History C# 5.0 Basic Features.NET Compiler Platform New IDE Experience C# 6.0 New Features

3 Brief History C# 1.0 VS 2002 - 2003.NET 1.0 - 1.1 C# 2.0 VS 2005.NET 2.0 C# 3.0 VS 2008 - 2010.NET 3.0 - 3.5 C# 4.0 VS 2010.NET 4.0 C# 5.0 VS 2012 - 2013.NET 4.5 Generics Static Classes Nullable Types Anonymous Methods LINQ Query & Lamda Expressions Extension Methods TPL DLR Named & Optional Params async + await Caller Info Managed Code

4 Synchronous vs Asynchronous Synchronous: Execution in a single series Wait one task to finish before move to another Bad User Experience Asynchronous: Run time-consuming operations concurrently Return as soon as an operation is completed Better User Experience

5 Asynchronous Programming Patterns Asynchronous Programming Model BeginMethodName and EndMethodName Event-based Asynchronous Pattern MethodNameAsync and MethodNameCompleted Task-based Asynchronous Pattern Single method returns Task or Task

6 async + await Return types: Task void Let compiler do the hard work How does it work?

7 async void Only for event handlers Caller has no information when async void is completed Caller is unable to catch exceptions from an async void

8 Demo

9 Caller Infromation Attributes Debugging, tracing, error handling in runtime Argument types: [CallerMemberName] [CallerFilePath] [CallerLineNumber] Apply to optional parameters

10 Demo

11 Opening up VS 2013 Community Edition - Free full featured IDE.NET Server Core “Roslyn” Compiler

12 New IDE Experience Quick Fixes Renaming Tool Introduce Local Colorization Quick Info Signature Help

13 C# 6.0 New Features (1) Using Static Classes using System.Console; WriteLine("My message"); Await Calls in catch and finally try { //Do some work } catch (Exception ex) { await Task.Delay(200); } finally { await Task.Delay(200); }; Exception Filters catch (Exception ex) if (ex.Message.Contains("Cannot divide")) Null Conditional Operator member operator: ?. index operator: ?[]

14 C# 6.0 New Features (2) nameof Expressions throw new ArgumentNullException(nameof(value)); Dictionary Initializers var myDict = new Dictionary () { [1] = "My Name" }; Auto-Property Initializers Only Getter: public Guid guid { get; } = new Guid(); Getter/Setter: public int studentYearOfBirth { get; set; } = 1993; Epression Bodied Properties & Functions public string firstName => string.Format("{0} {1}", firstNm, lastNm); public int age() => DateTime.Now.Year - yearOfBirth;

15 Demo

16 Useful Links Visual Studio 2013 Community Edition: http://www.visualstudio.com/products/visual-studio-community-vs Visual Studio 2015 Preview &.NET 4.6 Preview: http://www.visualstudio.com/en-us/downloads/visual-studio-2015- downloads-vs “Roslyn” Compiler: http://roslyn.codeplex.com/ http://source.roslyn.codeplex.com/

17 Microsoft Virtual Academy for Devs Όλα τα trainings που χρειάζεσαι δωρεάν σε ένα site! /game development / /web development / /cloud development / /mobile development / /C#-XAML-HTML/ /app development/ /visual studio και πολλά άλλα… www.microsoftvirtualacademy.com MVA

18 Session Evaluation Your feedback is important and valuable Submit before the event’s close session to WIN prizes 2 ways to access Go to m.itprodevconnections.gr Ask for an Evaluation Sheet from the registration desk

19 Get In Touch www.facebook.com/marita.paletsou @MaritaPaletsou paletsou@hotmail.comwww.codespot.gr

20 Q&AQ&A Questions And Answers

21 Thank you!


Download ppt "C# Present and Future Marita Paletsou Software Engineer."

Similar presentations


Ads by Google