SlideShare a Scribd company logo
1 of 23
Overview of C# 3.0 Presentation created by EriawanKusumawardhono, for RX Communica
C# 3.0 is? A part of .NET programming languages from Microsoft It is released with Visual Studio 2008 and .NET 3.5
Historical perspective of C# 3.0 A quick tour of historical view
Beginning of C# C# was a first managed language to compete with Java Microsoft was lost in court because of J++ implementation C# 1.0 was designed and developed in 1999 C# 1.0 has basic OOP of inheritance, polymorphism Property mechanism is the same concept as VB 4.0+
C# is? Statically typed language Early bound Based on CLR and CTS of .NET Also part of “curly braces” languages such as C, C++, Objective C, Java Imperative language as part of OOP
Managed language is simply virtualization Just like Java runs in its VM Virtualization promotes cleaner environment, optimization, garbage collection, thread optimization within one “virtual” platform A light lose coupling between OS and application written in managed environment or virtualization Reduced OS version dependency and functionality
So why? It is simply, raising an abstraction, not adding abstraction Focusing more on what you want to be done, not how
The sample of adding abstraction: batch command
Raising level of abstraction
Conceptual difference of abstraction Raising abstraction Intended to be more declarative Does not hide the detail of underlying platform Still can access the OS API using P/Invoke in .NET and JNI in Java Adding abstraction Not intended to be more declarative Often creating more new conceptual topics Often hide the detail of the underlying platform
What comes with C# 2.0 Adding generics on type and method declaration Generic type inference on methods and method parameters Reflection granularity Nullable types Iterator of “yield” Anonymous delegate
Current release of C#: 3.0 Present state of C# (2009)
Continuous design from previous releases New features are based on previous releases Maintaining runtime compatibility and based on CLR of .NET 2.0
C# 3.0 theme LINQ Functional programming in style
LINQ is build on Query comprehension Extension method Lambda expression Expression tree Property initializer Anonymous type initializer Local variable type inference
Quick feature look var x = from c in db.customer         where c.City ==“London”          select c.Name, c.City Local type infer Query comprehension Lambda expression var x = db.Customer         .Where(c => c.City == “London”)         .Select(c=> new {c.Name,c.City} Extension method Anonymous object/type initializer
Query comprehension Adapting SQL query of SELECT Not a real keyword in C#, it is a pseudo keyword SELECT, WHERE, ORDER BY, GROUP BY is then translated into calls to extension methods
Lambda Expression overview It is simply an anonymous delegate but with the functional math syntax Taken from ideas in Lambda calculus
Extension methods Adding static method to a class or interfaces without deriving it Use it wisely Can be a bad smell in coding practice
Next is: C# 4.0 Main theme: support for dynamic type
Overview of C# 4.0 Dynamic type Co and Contra variance Optional and named parameters No PIA
Beyond C# 4.0 Compiler as a service True meta programming Method execution into multi core (parallel) Function purity
End

More Related Content

What's hot (17)

Differences between c and c++
Differences between c and c++Differences between c and c++
Differences between c and c++
 
C++ vs C#
C++ vs C#C++ vs C#
C++ vs C#
 
Introduction to programming with c,
Introduction to programming with c,Introduction to programming with c,
Introduction to programming with c,
 
CSharp Presentation
CSharp PresentationCSharp Presentation
CSharp Presentation
 
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREC & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
 
C++ to java
C++ to javaC++ to java
C++ to java
 
Programming Methodology
Programming MethodologyProgramming Methodology
Programming Methodology
 
Oops index
Oops indexOops index
Oops index
 
Revealing C# 5
Revealing C# 5Revealing C# 5
Revealing C# 5
 
C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#
 
C#unit4
C#unit4C#unit4
C#unit4
 
introduction to c language
 introduction to c language introduction to c language
introduction to c language
 
C_Programming_Notes_ICE
C_Programming_Notes_ICEC_Programming_Notes_ICE
C_Programming_Notes_ICE
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
C++vs java
C++vs javaC++vs java
C++vs java
 
2. data, operators, io
2. data, operators, io2. data, operators, io
2. data, operators, io
 
C languaGE UNIT-1
C languaGE UNIT-1C languaGE UNIT-1
C languaGE UNIT-1
 

Viewers also liked

Role of serious games and immersive technologies
Role of serious games and immersive technologiesRole of serious games and immersive technologies
Role of serious games and immersive technologiesDavid Wortley
 
Shaspa Intelligent Shared Spaces And Sustainable Development
Shaspa Intelligent Shared Spaces And Sustainable DevelopmentShaspa Intelligent Shared Spaces And Sustainable Development
Shaspa Intelligent Shared Spaces And Sustainable DevelopmentDavid Wortley
 
Serious Games And Stem Education
Serious Games And Stem EducationSerious Games And Stem Education
Serious Games And Stem EducationDavid Wortley
 
Climate Change And Collaboration Technologies
Climate Change And Collaboration TechnologiesClimate Change And Collaboration Technologies
Climate Change And Collaboration TechnologiesDavid Wortley
 
Immersive technologies and recruitment assessment and lifelong learning
Immersive technologies and recruitment assessment and lifelong learningImmersive technologies and recruitment assessment and lifelong learning
Immersive technologies and recruitment assessment and lifelong learningDavid Wortley
 
SHASPA Data Visualisation Framework - Intelligent Shared Spaces for Sustainab...
SHASPA Data Visualisation Framework - Intelligent Shared Spaces for Sustainab...SHASPA Data Visualisation Framework - Intelligent Shared Spaces for Sustainab...
SHASPA Data Visualisation Framework - Intelligent Shared Spaces for Sustainab...David Wortley
 
Serious Games For Health And Science
Serious Games For Health And ScienceSerious Games For Health And Science
Serious Games For Health And ScienceDavid Wortley
 
Serious Games Past Present And Future
Serious Games Past Present And FutureSerious Games Past Present And Future
Serious Games Past Present And FutureDavid Wortley
 

Viewers also liked (8)

Role of serious games and immersive technologies
Role of serious games and immersive technologiesRole of serious games and immersive technologies
Role of serious games and immersive technologies
 
Shaspa Intelligent Shared Spaces And Sustainable Development
Shaspa Intelligent Shared Spaces And Sustainable DevelopmentShaspa Intelligent Shared Spaces And Sustainable Development
Shaspa Intelligent Shared Spaces And Sustainable Development
 
Serious Games And Stem Education
Serious Games And Stem EducationSerious Games And Stem Education
Serious Games And Stem Education
 
Climate Change And Collaboration Technologies
Climate Change And Collaboration TechnologiesClimate Change And Collaboration Technologies
Climate Change And Collaboration Technologies
 
Immersive technologies and recruitment assessment and lifelong learning
Immersive technologies and recruitment assessment and lifelong learningImmersive technologies and recruitment assessment and lifelong learning
Immersive technologies and recruitment assessment and lifelong learning
 
SHASPA Data Visualisation Framework - Intelligent Shared Spaces for Sustainab...
SHASPA Data Visualisation Framework - Intelligent Shared Spaces for Sustainab...SHASPA Data Visualisation Framework - Intelligent Shared Spaces for Sustainab...
SHASPA Data Visualisation Framework - Intelligent Shared Spaces for Sustainab...
 
Serious Games For Health And Science
Serious Games For Health And ScienceSerious Games For Health And Science
Serious Games For Health And Science
 
Serious Games Past Present And Future
Serious Games Past Present And FutureSerious Games Past Present And Future
Serious Games Past Present And Future
 

Similar to Introduction to C# 3.0

Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)John Smith
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Wes Yanaga
 
21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)
21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)
21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)ssuser7f90ae
 
Net framework
Net frameworkNet framework
Net frameworkTuan Ngo
 
Event Driven Programming in C#.docx
Event Driven Programming in C#.docxEvent Driven Programming in C#.docx
Event Driven Programming in C#.docxLenchoMamudeBaro
 
C# programming language
C# programming languageC# programming language
C# programming languageswarnapatil
 
Migrating From Cpp To C Sharp
Migrating From Cpp To C SharpMigrating From Cpp To C Sharp
Migrating From Cpp To C SharpGanesh Samarthyam
 
C# 3.0 and 4.0
C# 3.0 and 4.0C# 3.0 and 4.0
C# 3.0 and 4.0Buu Nguyen
 
Lecture 0 Object Oriented Programming.pdf
Lecture 0 Object Oriented Programming.pdfLecture 0 Object Oriented Programming.pdf
Lecture 0 Object Oriented Programming.pdfMianSaeedAkbar1
 

Similar to Introduction to C# 3.0 (20)

C#
C#C#
C#
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)
 
21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)
21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)
21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)
 
Net framework
Net frameworkNet framework
Net framework
 
Srgoc dotnet_new
Srgoc dotnet_newSrgoc dotnet_new
Srgoc dotnet_new
 
CSharp.ppt
CSharp.pptCSharp.ppt
CSharp.ppt
 
CSharp.ppt
CSharp.pptCSharp.ppt
CSharp.ppt
 
CSharp.ppt
CSharp.pptCSharp.ppt
CSharp.ppt
 
CSharp.ppt
CSharp.pptCSharp.ppt
CSharp.ppt
 
C# tutorial
C# tutorialC# tutorial
C# tutorial
 
Presentation1
Presentation1Presentation1
Presentation1
 
Event Driven Programming in C#.docx
Event Driven Programming in C#.docxEvent Driven Programming in C#.docx
Event Driven Programming in C#.docx
 
C# programming language
C# programming languageC# programming language
C# programming language
 
Programming with c#
Programming with c#Programming with c#
Programming with c#
 
Programming in c#
Programming in c#Programming in c#
Programming in c#
 
Migrating From Cpp To C Sharp
Migrating From Cpp To C SharpMigrating From Cpp To C Sharp
Migrating From Cpp To C Sharp
 
C# 3.0 and 4.0
C# 3.0 and 4.0C# 3.0 and 4.0
C# 3.0 and 4.0
 
Lecture 0 Object Oriented Programming.pdf
Lecture 0 Object Oriented Programming.pdfLecture 0 Object Oriented Programming.pdf
Lecture 0 Object Oriented Programming.pdf
 
1.Philosophy of .NET
1.Philosophy of .NET1.Philosophy of .NET
1.Philosophy of .NET
 

Recently uploaded

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 

Recently uploaded (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Introduction to C# 3.0

  • 1. Overview of C# 3.0 Presentation created by EriawanKusumawardhono, for RX Communica
  • 2. C# 3.0 is? A part of .NET programming languages from Microsoft It is released with Visual Studio 2008 and .NET 3.5
  • 3. Historical perspective of C# 3.0 A quick tour of historical view
  • 4. Beginning of C# C# was a first managed language to compete with Java Microsoft was lost in court because of J++ implementation C# 1.0 was designed and developed in 1999 C# 1.0 has basic OOP of inheritance, polymorphism Property mechanism is the same concept as VB 4.0+
  • 5. C# is? Statically typed language Early bound Based on CLR and CTS of .NET Also part of “curly braces” languages such as C, C++, Objective C, Java Imperative language as part of OOP
  • 6. Managed language is simply virtualization Just like Java runs in its VM Virtualization promotes cleaner environment, optimization, garbage collection, thread optimization within one “virtual” platform A light lose coupling between OS and application written in managed environment or virtualization Reduced OS version dependency and functionality
  • 7. So why? It is simply, raising an abstraction, not adding abstraction Focusing more on what you want to be done, not how
  • 8. The sample of adding abstraction: batch command
  • 9. Raising level of abstraction
  • 10. Conceptual difference of abstraction Raising abstraction Intended to be more declarative Does not hide the detail of underlying platform Still can access the OS API using P/Invoke in .NET and JNI in Java Adding abstraction Not intended to be more declarative Often creating more new conceptual topics Often hide the detail of the underlying platform
  • 11. What comes with C# 2.0 Adding generics on type and method declaration Generic type inference on methods and method parameters Reflection granularity Nullable types Iterator of “yield” Anonymous delegate
  • 12. Current release of C#: 3.0 Present state of C# (2009)
  • 13. Continuous design from previous releases New features are based on previous releases Maintaining runtime compatibility and based on CLR of .NET 2.0
  • 14. C# 3.0 theme LINQ Functional programming in style
  • 15. LINQ is build on Query comprehension Extension method Lambda expression Expression tree Property initializer Anonymous type initializer Local variable type inference
  • 16. Quick feature look var x = from c in db.customer where c.City ==“London” select c.Name, c.City Local type infer Query comprehension Lambda expression var x = db.Customer .Where(c => c.City == “London”) .Select(c=> new {c.Name,c.City} Extension method Anonymous object/type initializer
  • 17. Query comprehension Adapting SQL query of SELECT Not a real keyword in C#, it is a pseudo keyword SELECT, WHERE, ORDER BY, GROUP BY is then translated into calls to extension methods
  • 18. Lambda Expression overview It is simply an anonymous delegate but with the functional math syntax Taken from ideas in Lambda calculus
  • 19. Extension methods Adding static method to a class or interfaces without deriving it Use it wisely Can be a bad smell in coding practice
  • 20. Next is: C# 4.0 Main theme: support for dynamic type
  • 21. Overview of C# 4.0 Dynamic type Co and Contra variance Optional and named parameters No PIA
  • 22. Beyond C# 4.0 Compiler as a service True meta programming Method execution into multi core (parallel) Function purity
  • 23. End