SlideShare una empresa de Scribd logo
1 de 18
By- Praveen Kumar Prajapati
  Blog: praveenprajapati.wordpress.com
Agenda
 Background
 New Features in C# 5
 Breaking Changes
 Asynchronous Programming
 Caller Info Attributes
 Windows Runtime Support (Metro Style apps)
 The Road Ahead
Background
Version   Theme              Year        .NET   Visual Studio

C # 1.0   Managed Code       Jan 2002    1.0    VS .NET 2002

C # 2.0   Generics           Nov 2005    2.0    VS 2005

C # 3.0   Language Integrated Nov 2007   3.5    VS 2008
          Query
C # 4.0   Dynamic            Apr 2010    4.0    VS 2010

C # 5.0   Asynchrony and     Feb 2012    4.5    VS 2011
          Windows Runtime
New Features in C# 5
 Breaking Changes
    Lambda expressions
    LINQ expressions
    Named arguments
 Asynchronous Programming
 Caller Info Attributes
 Windows Runtime Support
Breaking Changes
 Lambda expressions: Use of iteration variable of a foreach
  statement in a lambda expression that’s contained in the body of the
  loop


 LINQ expressions: Use of iteration variable of a foreach statement
  in a LINQ expression that’s contained in the body of the loop


 Named arguments: Side effects from named and positional
  arguments in a method call now occur in the correct order
Breaking Changes
 Demo :
    Lambda expressions
    LINQ expressions
    Named arguments
Asynchronous Programming
 New Keyword introduces:
    async
    await


 Rules and recommendations for use of those keywords
Asynchronous Programming
public async Task<XElement> GetXmlAsync(string url)
{
    var client = new HttpClient();
    var response = await client.GetAsync(url);
    var text = response.Content.ReadAsString();
    return XElement.Parse(text);
}

                      public Task<XElement> GetXmlAsync(string url) {
                          var tcs = new TaskCompletionSource<XElement>();
                          var client = new HttpClient();
                          client.GetAsync(url).ContinueWith(task => {
                              var response = task.Result;
                              var text = response.Content.ReadAsString();
                              tcs.SetResult(XElement.Parse(text));
                          });
                          return tcs.Task;
                      }
Asynchronous Programming
 Demo: Use of async and await
 How it reduces efforts and make code better
Caller Info Attributes
 More easily obtain information about the caller of a
  method. By using Caller Info attributes, you can identify
  the file path of the source code, the line number in the
  source code, and the member name of the caller.



 Demo: The use of Caller info attributes
 How it reduces efforts and make code better
Windows Runtime Support
 Windows Runtime: WinRT, is Microsoft's new programming
  model that makes the backbone of the new Metro-style apps
  (also known as Immersive) in Windows 8 operating system

 .NET APIs for Metro style apps provides a subset of managed
  types that you can use to create Metro style apps. This subset
  of managed types is called the .NET APIs for Metro style apps.

 Deep integration with the Windows Runtime - a C# project
  can compiled into a WinMD file and then referenced from a
  HTML/JavaScript project.
What is Metro Style
 Metro is the whole design language behind Windows
  Phone, and is a big part of the future of Microsoft

 Using clean, crisp, clear information to get information
  across as quickly and accurately as possible

 Windows Metro style apps are designed for specific form
  factors and leverage the power of the Windows operating
  system.
Windows Metro style apps
 Metro style apps are immersive and chromeless, filling the entire
  screen so there are no distractions.

 Metro style apps work together, making it easy to search, share, and
  send content between them.

 Metro style apps are tailored to your users' needs, to specific
  devices, to touch interaction and hardware events, and to the new
  Windows user experience in Windows 8 Consumer Preview.
Metro style design principles
Metro style design has a set of five guiding principles to help you make
the best choices when designing your app. These principles are the
foundation for building great Metro style apps.


 Show pride in craftsmanship
 Be fast and fluid
 Be authentically digital
 Do more with less
 Win as one
What is excluded
The subset of managed types and members was designed
with a clear focus on Metro style app development. As a
result, it omits the following:

 Types and members that are not applicable to developing Metro
    style apps (such as console and ASP.NET types).
   Obsolete and legacy types.
   Types that overlap with Windows Runtime types.
   Types and members that wrap operating system functionality (such
    as System.Diagnostics.EventLog and performance counters).
   Members that cause confusion (such as the Close method on I/O
    types).
Windows Runtime Support
 Demo: Window Runtime support
The Road Ahead
 Compiler as a service
 The Roslyn Project
 CTP of Visual Studio Roslyn in mid October 2011
 C# interactive window
 “Paste as VB” and “Paste as C#”
Thanks to You All
Let us grow together

       Keep in touch:
   Blog: praveenprajapati.wordpress.com

Más contenido relacionado

La actualidad más candente

Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To DotnetSAMIR BHOGAYTA
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010Satish Verma
 
3.0 Introduction to .NET Framework
3.0 Introduction to .NET Framework3.0 Introduction to .NET Framework
3.0 Introduction to .NET FrameworkAbdelrahman Hosny
 
Ddd melbourne 2011 C# async ctp
Ddd melbourne 2011  C# async ctpDdd melbourne 2011  C# async ctp
Ddd melbourne 2011 C# async ctpPratik Khasnabis
 
What's New In C# 5.0 - Programar 2013
What's New In C# 5.0 - Programar 2013What's New In C# 5.0 - Programar 2013
What's New In C# 5.0 - Programar 2013Paulo Morgado
 
Electron Typescript Single Page Apps
Electron Typescript Single Page AppsElectron Typescript Single Page Apps
Electron Typescript Single Page AppsStuart
 
ASP.NET Session 3
ASP.NET Session 3ASP.NET Session 3
ASP.NET Session 3Sisir Ghosh
 
.Net framework
.Net framework.Net framework
.Net frameworkArun Pal
 
C# programming language
C# programming languageC# programming language
C# programming languageswarnapatil
 
Synapse india sharing info on dotnet framework part1
Synapse india sharing info on dotnet framework part1Synapse india sharing info on dotnet framework part1
Synapse india sharing info on dotnet framework part1Synapseindiappsdevelopment
 
Asp.net c# MVC-5 Training-Day-2 of Day-9
Asp.net c# MVC-5 Training-Day-2 of Day-9Asp.net c# MVC-5 Training-Day-2 of Day-9
Asp.net c# MVC-5 Training-Day-2 of Day-9AHM Pervej Kabir
 
Asp.net c# mvc Training-Day-5 of Day-9
Asp.net c# mvc Training-Day-5 of Day-9Asp.net c# mvc Training-Day-5 of Day-9
Asp.net c# mvc Training-Day-5 of Day-9AHM Pervej Kabir
 

La actualidad más candente (20)

Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To Dotnet
 
Introduction to c#
Introduction to c#Introduction to c#
Introduction to c#
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
3.0 Introduction to .NET Framework
3.0 Introduction to .NET Framework3.0 Introduction to .NET Framework
3.0 Introduction to .NET Framework
 
Ddd melbourne 2011 C# async ctp
Ddd melbourne 2011  C# async ctpDdd melbourne 2011  C# async ctp
Ddd melbourne 2011 C# async ctp
 
Microsoft .Net Technology
Microsoft .Net TechnologyMicrosoft .Net Technology
Microsoft .Net Technology
 
What's New In C# 5.0 - Programar 2013
What's New In C# 5.0 - Programar 2013What's New In C# 5.0 - Programar 2013
What's New In C# 5.0 - Programar 2013
 
Electron Typescript Single Page Apps
Electron Typescript Single Page AppsElectron Typescript Single Page Apps
Electron Typescript Single Page Apps
 
.Net language support
.Net language support.Net language support
.Net language support
 
ASP.NET Session 3
ASP.NET Session 3ASP.NET Session 3
ASP.NET Session 3
 
A tutorial on C++ Programming
A tutorial on C++ ProgrammingA tutorial on C++ Programming
A tutorial on C++ Programming
 
.Net Standard 2.0
.Net Standard 2.0.Net Standard 2.0
.Net Standard 2.0
 
.Net framework
.Net framework.Net framework
.Net framework
 
C# programming language
C# programming languageC# programming language
C# programming language
 
Synapse india sharing info on dotnet framework part1
Synapse india sharing info on dotnet framework part1Synapse india sharing info on dotnet framework part1
Synapse india sharing info on dotnet framework part1
 
C++
C++C++
C++
 
Asp.net c# MVC-5 Training-Day-2 of Day-9
Asp.net c# MVC-5 Training-Day-2 of Day-9Asp.net c# MVC-5 Training-Day-2 of Day-9
Asp.net c# MVC-5 Training-Day-2 of Day-9
 
.NET Framework
.NET Framework.NET Framework
.NET Framework
 
Asp.net c# mvc Training-Day-5 of Day-9
Asp.net c# mvc Training-Day-5 of Day-9Asp.net c# mvc Training-Day-5 of Day-9
Asp.net c# mvc Training-Day-5 of Day-9
 
Design your own test automation tool
Design your own test automation toolDesign your own test automation tool
Design your own test automation tool
 

Destacado

Mid Year Update 2011
Mid Year Update 2011Mid Year Update 2011
Mid Year Update 2011mk3660
 
J6A-AA MSW Perspectives, Attitudes, and Belifs about HIV/AIDS in High-Crime, ...
J6A-AA MSW Perspectives, Attitudes, and Belifs about HIV/AIDS in High-Crime, ...J6A-AA MSW Perspectives, Attitudes, and Belifs about HIV/AIDS in High-Crime, ...
J6A-AA MSW Perspectives, Attitudes, and Belifs about HIV/AIDS in High-Crime, ...kparker6
 
Tootie Groothandel2009
Tootie Groothandel2009Tootie Groothandel2009
Tootie Groothandel2009Tootie.be
 
2010長灘島行程飯店簡介 菲長灘心-師範大學團new
2010長灘島行程飯店簡介 菲長灘心-師範大學團new2010長灘島行程飯店簡介 菲長灘心-師範大學團new
2010長灘島行程飯店簡介 菲長灘心-師範大學團newbigblossom
 
Reflexión grafica Quino
Reflexión grafica QuinoReflexión grafica Quino
Reflexión grafica QuinoPRONAEX
 
Mesaemprendedoresucajerez
MesaemprendedoresucajerezMesaemprendedoresucajerez
MesaemprendedoresucajerezPRONAEX
 
Henrietta Louise Marston
Henrietta Louise MarstonHenrietta Louise Marston
Henrietta Louise Marstonbmarston
 
2010長灘島行程飯店簡介 菲長灘心-師範大學團new1
2010長灘島行程飯店簡介 菲長灘心-師範大學團new12010長灘島行程飯店簡介 菲長灘心-師範大學團new1
2010長灘島行程飯店簡介 菲長灘心-師範大學團new1bigblossom
 
Pp Giai Bt Kim Loai Ho Chi Tuan Dhy Hn
Pp Giai Bt Kim Loai Ho Chi Tuan Dhy HnPp Giai Bt Kim Loai Ho Chi Tuan Dhy Hn
Pp Giai Bt Kim Loai Ho Chi Tuan Dhy Hnquylot1010
 
C# 5 deep drive into asynchronous programming
C# 5 deep drive into asynchronous programmingC# 5 deep drive into asynchronous programming
C# 5 deep drive into asynchronous programmingPraveen Prajapati
 

Destacado (11)

Mid Year Update 2011
Mid Year Update 2011Mid Year Update 2011
Mid Year Update 2011
 
J6A-AA MSW Perspectives, Attitudes, and Belifs about HIV/AIDS in High-Crime, ...
J6A-AA MSW Perspectives, Attitudes, and Belifs about HIV/AIDS in High-Crime, ...J6A-AA MSW Perspectives, Attitudes, and Belifs about HIV/AIDS in High-Crime, ...
J6A-AA MSW Perspectives, Attitudes, and Belifs about HIV/AIDS in High-Crime, ...
 
Tootie Groothandel2009
Tootie Groothandel2009Tootie Groothandel2009
Tootie Groothandel2009
 
2010長灘島行程飯店簡介 菲長灘心-師範大學團new
2010長灘島行程飯店簡介 菲長灘心-師範大學團new2010長灘島行程飯店簡介 菲長灘心-師範大學團new
2010長灘島行程飯店簡介 菲長灘心-師範大學團new
 
Reflexión grafica Quino
Reflexión grafica QuinoReflexión grafica Quino
Reflexión grafica Quino
 
Presentation1
Presentation1Presentation1
Presentation1
 
Mesaemprendedoresucajerez
MesaemprendedoresucajerezMesaemprendedoresucajerez
Mesaemprendedoresucajerez
 
Henrietta Louise Marston
Henrietta Louise MarstonHenrietta Louise Marston
Henrietta Louise Marston
 
2010長灘島行程飯店簡介 菲長灘心-師範大學團new1
2010長灘島行程飯店簡介 菲長灘心-師範大學團new12010長灘島行程飯店簡介 菲長灘心-師範大學團new1
2010長灘島行程飯店簡介 菲長灘心-師範大學團new1
 
Pp Giai Bt Kim Loai Ho Chi Tuan Dhy Hn
Pp Giai Bt Kim Loai Ho Chi Tuan Dhy HnPp Giai Bt Kim Loai Ho Chi Tuan Dhy Hn
Pp Giai Bt Kim Loai Ho Chi Tuan Dhy Hn
 
C# 5 deep drive into asynchronous programming
C# 5 deep drive into asynchronous programmingC# 5 deep drive into asynchronous programming
C# 5 deep drive into asynchronous programming
 

Similar a Revealing C# 5

Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netconline training
 
.NET ONLINE TRAINING COURSE CONTENT
.NET ONLINE TRAINING COURSE CONTENT .NET ONLINE TRAINING COURSE CONTENT
.NET ONLINE TRAINING COURSE CONTENT raaviraja
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersDave Bost
 
Introdot Netc Sharp En
Introdot Netc Sharp EnIntrodot Netc Sharp En
Introdot Netc Sharp EnGregory Renard
 
Unit - 1: ASP.NET Basic
Unit - 1:  ASP.NET BasicUnit - 1:  ASP.NET Basic
Unit - 1: ASP.NET BasicKALIDHASANR
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0Thomas Conté
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NETsalonityagi
 
Whidbey old
Whidbey old Whidbey old
Whidbey old grenaud
 
Net framework
Net frameworkNet framework
Net frameworkjhsri
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Clint Edmonson
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Jeff Blankenburg
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan
 
Microsoft.net architecturte
Microsoft.net architecturteMicrosoft.net architecturte
Microsoft.net architecturteIblesoft
 
Project_Report (BARC-Jerin)_final
Project_Report (BARC-Jerin)_finalProject_Report (BARC-Jerin)_final
Project_Report (BARC-Jerin)_finalJerin John
 
dotNET frameworks
dotNET frameworksdotNET frameworks
dotNET frameworksnawal saad
 

Similar a Revealing C# 5 (20)

Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot net
 
.net online training
.net online training .net online training
.net online training
 
.NET ONLINE TRAINING COURSE CONTENT
.NET ONLINE TRAINING COURSE CONTENT .NET ONLINE TRAINING COURSE CONTENT
.NET ONLINE TRAINING COURSE CONTENT
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
 
Dot net online training
Dot net online training Dot net online training
Dot net online training
 
As Pdotnet
As PdotnetAs Pdotnet
As Pdotnet
 
Introdot Netc Sharp En
Introdot Netc Sharp EnIntrodot Netc Sharp En
Introdot Netc Sharp En
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
 
Unit - 1: ASP.NET Basic
Unit - 1:  ASP.NET BasicUnit - 1:  ASP.NET Basic
Unit - 1: ASP.NET Basic
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NET
 
Whidbey old
Whidbey old Whidbey old
Whidbey old
 
Net framework
Net frameworkNet framework
Net framework
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2
 
Microsoft.net architecturte
Microsoft.net architecturteMicrosoft.net architecturte
Microsoft.net architecturte
 
Project_Report (BARC-Jerin)_final
Project_Report (BARC-Jerin)_finalProject_Report (BARC-Jerin)_final
Project_Report (BARC-Jerin)_final
 
dotNET frameworks
dotNET frameworksdotNET frameworks
dotNET frameworks
 

Último

Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 

Último (20)

Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 

Revealing C# 5

  • 1. By- Praveen Kumar Prajapati Blog: praveenprajapati.wordpress.com
  • 2. Agenda  Background  New Features in C# 5  Breaking Changes  Asynchronous Programming  Caller Info Attributes  Windows Runtime Support (Metro Style apps)  The Road Ahead
  • 3. Background Version Theme Year .NET Visual Studio C # 1.0 Managed Code Jan 2002 1.0 VS .NET 2002 C # 2.0 Generics Nov 2005 2.0 VS 2005 C # 3.0 Language Integrated Nov 2007 3.5 VS 2008 Query C # 4.0 Dynamic Apr 2010 4.0 VS 2010 C # 5.0 Asynchrony and Feb 2012 4.5 VS 2011 Windows Runtime
  • 4. New Features in C# 5  Breaking Changes  Lambda expressions  LINQ expressions  Named arguments  Asynchronous Programming  Caller Info Attributes  Windows Runtime Support
  • 5. Breaking Changes  Lambda expressions: Use of iteration variable of a foreach statement in a lambda expression that’s contained in the body of the loop  LINQ expressions: Use of iteration variable of a foreach statement in a LINQ expression that’s contained in the body of the loop  Named arguments: Side effects from named and positional arguments in a method call now occur in the correct order
  • 6. Breaking Changes  Demo :  Lambda expressions  LINQ expressions  Named arguments
  • 7. Asynchronous Programming  New Keyword introduces:  async  await  Rules and recommendations for use of those keywords
  • 8. Asynchronous Programming public async Task<XElement> GetXmlAsync(string url) { var client = new HttpClient(); var response = await client.GetAsync(url); var text = response.Content.ReadAsString(); return XElement.Parse(text); } public Task<XElement> GetXmlAsync(string url) { var tcs = new TaskCompletionSource<XElement>(); var client = new HttpClient(); client.GetAsync(url).ContinueWith(task => { var response = task.Result; var text = response.Content.ReadAsString(); tcs.SetResult(XElement.Parse(text)); }); return tcs.Task; }
  • 9. Asynchronous Programming  Demo: Use of async and await  How it reduces efforts and make code better
  • 10. Caller Info Attributes  More easily obtain information about the caller of a method. By using Caller Info attributes, you can identify the file path of the source code, the line number in the source code, and the member name of the caller.  Demo: The use of Caller info attributes  How it reduces efforts and make code better
  • 11. Windows Runtime Support  Windows Runtime: WinRT, is Microsoft's new programming model that makes the backbone of the new Metro-style apps (also known as Immersive) in Windows 8 operating system  .NET APIs for Metro style apps provides a subset of managed types that you can use to create Metro style apps. This subset of managed types is called the .NET APIs for Metro style apps.  Deep integration with the Windows Runtime - a C# project can compiled into a WinMD file and then referenced from a HTML/JavaScript project.
  • 12. What is Metro Style  Metro is the whole design language behind Windows Phone, and is a big part of the future of Microsoft  Using clean, crisp, clear information to get information across as quickly and accurately as possible  Windows Metro style apps are designed for specific form factors and leverage the power of the Windows operating system.
  • 13. Windows Metro style apps  Metro style apps are immersive and chromeless, filling the entire screen so there are no distractions.  Metro style apps work together, making it easy to search, share, and send content between them.  Metro style apps are tailored to your users' needs, to specific devices, to touch interaction and hardware events, and to the new Windows user experience in Windows 8 Consumer Preview.
  • 14. Metro style design principles Metro style design has a set of five guiding principles to help you make the best choices when designing your app. These principles are the foundation for building great Metro style apps.  Show pride in craftsmanship  Be fast and fluid  Be authentically digital  Do more with less  Win as one
  • 15. What is excluded The subset of managed types and members was designed with a clear focus on Metro style app development. As a result, it omits the following:  Types and members that are not applicable to developing Metro style apps (such as console and ASP.NET types).  Obsolete and legacy types.  Types that overlap with Windows Runtime types.  Types and members that wrap operating system functionality (such as System.Diagnostics.EventLog and performance counters).  Members that cause confusion (such as the Close method on I/O types).
  • 16. Windows Runtime Support  Demo: Window Runtime support
  • 17. The Road Ahead  Compiler as a service  The Roslyn Project  CTP of Visual Studio Roslyn in mid October 2011  C# interactive window  “Paste as VB” and “Paste as C#”
  • 18. Thanks to You All Let us grow together Keep in touch: Blog: praveenprajapati.wordpress.com

Notas del editor

  1. When users are connected to the internet, their apps show them the latest content so that they can stay up to date. With a connected account, users can download apps and use them on any Windows device.