SlideShare a Scribd company logo
1 of 17
Download to read offline
Introduction to .NET
Framework 3.5 and
       C# 3.0
             Programming in C#


                tnngo2@gmail.com
A look back …




                             3.5
                             3.0

   .NET 1.0     .NET 1.1   .NET 2.0   .NET 4
     2002        2003       2005-08   2008 CTP


    CLR 1.0      CLR 1.1    CLR 2.0    CLR 4
Architecture




             Win                                                     And
   WPF                  DLR        ASP.NET   WCF          LINQ
            Forms                                                   more!




                            Base Class Libraries

                                The CLR
    JIT &       Garbage          Security     Exception          Loader &
    NGEN        Collector         Model       Handling            Binder
JIT

      Interpreted                        Static
      compilation                      compilation

      in execution                       before executing
                       Just-in-time
                       Compilation

                     hybrid approach
NGEN

       use native image from cache instead using JIT compilation
Loader & Binder

      locating assemblies at run-time and binding to them.
WPF – Windows Presentation Foundation

      graphical subsystem for rendering UI in windows-based application

      Silverlight utilizes WPF to provide embedded web controls
      comparable to Adobe Flash but more focus on an UI object model
      and less on animation.
WCF – Windows Communication Foundation

     designing and deploying distributed applications under
     services- oriented architecture (SOA) implementation




             set of principle and methodologies for
             interoperable application
DLR – Dynamic language runtime

      a runtime environment that adds a set of services for dynamic
      languages to the common language runtime (CLR)

      Dynamic language identify the type of object at runtime whereas in
      statically type languages must specify object type at design time


      https://gist.github.com/2627105
New features of C# 3.0
Implicitly Typed Local Variables

       declare variables without specifying the type at design time

       Must be declared and initialized at the same time.
             var age; // Error, no initializer to infer the data type
             var age = 5; // Valid



       Cannot used as a return type and argument of method.

       Not possible for multiple declaration
             var age = 1, genre = “male”; // Error
Object Initializers

       Creates an object and initialize its fields and properties
       without a constructor



       https://gist.github.com/2627433
Auto-implemented Properties

      Creates an object and initialize its fields and properties
      without a constructor


            public string HouseName { get; set; }
Extension Methods

      Allows you to extend an existing type with new functionality without
      directly modifying those types

      Are static methods that have to be declared in a static class

      Declare an extension method by specifying the first parameter with
      this keyword

              static return-type MethodName (this type obj, param-list)



      https://gist.github.com/2627468
Collection Initializers


        ClassName objName =
              new CollectionClassName{ collection-initializer }
Predefined Generic Delegates

      Func<T, TResult>() Delegate
              Represents a method having one parameters type T and
              returns a value of type TResult

              public delegate TResult Func<TResult>()


      https://gist.github.com/2627640
Lambda Expressions

      is an alternative to anonymous methods.


        parameter-list => expression or statements




      https://gist.github.com/2633475

More Related Content

What's hot

Ramesh.resume_iiith
Ramesh.resume_iiithRamesh.resume_iiith
Ramesh.resume_iiith
a ramesh
 
Net serialization
Net serializationNet serialization
Net serialization
Greg Sohl
 

What's hot (18)

Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
 
difference between c c++ c#
difference between c c++ c#difference between c c++ c#
difference between c c++ c#
 
FregeDay: Design and Implementation of the language (Ingo Wechsung)
FregeDay: Design and Implementation of the language (Ingo Wechsung)FregeDay: Design and Implementation of the language (Ingo Wechsung)
FregeDay: Design and Implementation of the language (Ingo Wechsung)
 
Fast and Reliable Swift APIs with gRPC
Fast and Reliable Swift APIs with gRPCFast and Reliable Swift APIs with gRPC
Fast and Reliable Swift APIs with gRPC
 
Droidcon Summary 2021
Droidcon Summary 2021Droidcon Summary 2021
Droidcon Summary 2021
 
Dennis Benkert & Matthias Lübken - Patterns in a containerized world? - code....
Dennis Benkert & Matthias Lübken - Patterns in a containerized world? - code....Dennis Benkert & Matthias Lübken - Patterns in a containerized world? - code....
Dennis Benkert & Matthias Lübken - Patterns in a containerized world? - code....
 
Ramesh.resume_iiith
Ramesh.resume_iiithRamesh.resume_iiith
Ramesh.resume_iiith
 
Modern Programming Languages - An overview
Modern Programming Languages - An overviewModern Programming Languages - An overview
Modern Programming Languages - An overview
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPC
 
Net serialization
Net serializationNet serialization
Net serialization
 
Introduction to C# 3.0
Introduction to C# 3.0Introduction to C# 3.0
Introduction to C# 3.0
 
JS Fest 2018. Виталий Ратушный. ES X
JS Fest 2018. Виталий Ратушный. ES XJS Fest 2018. Виталий Ратушный. ES X
JS Fest 2018. Виталий Ратушный. ES X
 
Optimized declarative transformation First Eclipse QVTc results
Optimized declarative transformation First Eclipse QVTc resultsOptimized declarative transformation First Eclipse QVTc results
Optimized declarative transformation First Eclipse QVTc results
 
Lviv MD Day 2015 Павло Захаров "Reactive cocoa: paradigm shift"
Lviv MD Day 2015 Павло Захаров "Reactive cocoa: paradigm shift"Lviv MD Day 2015 Павло Захаров "Reactive cocoa: paradigm shift"
Lviv MD Day 2015 Павло Захаров "Reactive cocoa: paradigm shift"
 
Difference between c# generics and c++ templates
Difference between c# generics and c++ templatesDifference between c# generics and c++ templates
Difference between c# generics and c++ templates
 
Academy PRO: React JS. Typescript
Academy PRO: React JS. TypescriptAcademy PRO: React JS. Typescript
Academy PRO: React JS. Typescript
 
JS Fest 2018. Никита Галкин. Микросервисная архитектура с переиспользуемыми к...
JS Fest 2018. Никита Галкин. Микросервисная архитектура с переиспользуемыми к...JS Fest 2018. Никита Галкин. Микросервисная архитектура с переиспользуемыми к...
JS Fest 2018. Никита Галкин. Микросервисная архитектура с переиспользуемыми к...
 
Asynchronous programming in C#
Asynchronous programming in C#Asynchronous programming in C#
Asynchronous programming in C#
 

Viewers also liked

15 anonymous methods, partial types and nullable types
15   anonymous methods, partial types and nullable types15   anonymous methods, partial types and nullable types
15 anonymous methods, partial types and nullable types
Tuan Ngo
 
Data Type Conversion in C++
Data Type Conversion in C++Data Type Conversion in C++
Data Type Conversion in C++
Danial Mirza
 
Hopes 4 the future done ngawiki
Hopes 4 the future done ngawikiHopes 4 the future done ngawiki
Hopes 4 the future done ngawiki
lesleymccardle
 
Golf Center Kiev
Golf Center KievGolf Center Kiev
Golf Center Kiev
jshappo
 
Libguide template
Libguide templateLibguide template
Libguide template
granimal
 
Classification of Matter Overview. Spring. Day 2
Classification of Matter Overview. Spring. Day 2Classification of Matter Overview. Spring. Day 2
Classification of Matter Overview. Spring. Day 2
jmori1
 
библиотека
библиотекабиблиотека
библиотека
elvira38
 
Mba724 s4 3 survey methodology
Mba724 s4 3 survey methodologyMba724 s4 3 survey methodology
Mba724 s4 3 survey methodology
Rachel Chung
 

Viewers also liked (20)

15 anonymous methods, partial types and nullable types
15   anonymous methods, partial types and nullable types15   anonymous methods, partial types and nullable types
15 anonymous methods, partial types and nullable types
 
DATATYPE IN C# CSHARP.net
DATATYPE IN C# CSHARP.netDATATYPE IN C# CSHARP.net
DATATYPE IN C# CSHARP.net
 
7.data types in c#
7.data types in c#7.data types in c#
7.data types in c#
 
More Little Wonders of C#/.NET
More Little Wonders of C#/.NETMore Little Wonders of C#/.NET
More Little Wonders of C#/.NET
 
Data Type Conversion in C++
Data Type Conversion in C++Data Type Conversion in C++
Data Type Conversion in C++
 
Introduction to c#
Introduction to c#Introduction to c#
Introduction to c#
 
Destroying property
Destroying propertyDestroying property
Destroying property
 
AWS for everyone - 「今」からはじめるAWS@JAWS-UG 東北
AWS for everyone - 「今」からはじめるAWS@JAWS-UG 東北AWS for everyone - 「今」からはじめるAWS@JAWS-UG 東北
AWS for everyone - 「今」からはじめるAWS@JAWS-UG 東北
 
Hopes 4 the future done ngawiki
Hopes 4 the future done ngawikiHopes 4 the future done ngawiki
Hopes 4 the future done ngawiki
 
Golf Center Kiev
Golf Center KievGolf Center Kiev
Golf Center Kiev
 
Romania, my country, Dana B
Romania, my country, Dana BRomania, my country, Dana B
Romania, my country, Dana B
 
Cameco Community Relations Report (1998)
Cameco Community Relations Report (1998)Cameco Community Relations Report (1998)
Cameco Community Relations Report (1998)
 
Libguide template
Libguide templateLibguide template
Libguide template
 
Seven things to make your pup ONE in a million
Seven things to make your pup ONE in a millionSeven things to make your pup ONE in a million
Seven things to make your pup ONE in a million
 
Social challenges exposition
Social challenges expositionSocial challenges exposition
Social challenges exposition
 
Hieroglyphs
HieroglyphsHieroglyphs
Hieroglyphs
 
Classification of Matter Overview. Spring. Day 2
Classification of Matter Overview. Spring. Day 2Classification of Matter Overview. Spring. Day 2
Classification of Matter Overview. Spring. Day 2
 
Holiday Greetings from U.S. Ambassador to New Zealand and Samoa, David Huebner
Holiday Greetings from U.S. Ambassador to New Zealand and Samoa, David HuebnerHoliday Greetings from U.S. Ambassador to New Zealand and Samoa, David Huebner
Holiday Greetings from U.S. Ambassador to New Zealand and Samoa, David Huebner
 
библиотека
библиотекабиблиотека
библиотека
 
Mba724 s4 3 survey methodology
Mba724 s4 3 survey methodologyMba724 s4 3 survey methodology
Mba724 s4 3 survey methodology
 

Similar to Net framework

04 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_0504 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_05
Niit Care
 
Introdot Netc Sharp En
Introdot Netc Sharp EnIntrodot Netc Sharp En
Introdot Netc Sharp En
Gregory Renard
 
tybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notestybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notes
WE-IT TUTORIALS
 
Net Fundamentals
Net FundamentalsNet Fundamentals
Net Fundamentals
Ali Taki
 
Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net Fundamentals
LiquidHub
 

Similar to Net framework (20)

C sharp
C sharpC sharp
C sharp
 
04 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_0504 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_05
 
Introduction to Visual Studio.NET
Introduction to Visual Studio.NETIntroduction to Visual Studio.NET
Introduction to Visual Studio.NET
 
C# Unit 1 notes
C# Unit 1 notesC# Unit 1 notes
C# Unit 1 notes
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Introdot Netc Sharp En
Introdot Netc Sharp EnIntrodot Netc Sharp En
Introdot Netc Sharp En
 
OMG CORBA Component Model tutorial
OMG CORBA Component Model tutorialOMG CORBA Component Model tutorial
OMG CORBA Component Model tutorial
 
tybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notestybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notes
 
.net Framework
.net Framework.net Framework
.net Framework
 
C# tutorial
C# tutorialC# tutorial
C# tutorial
 
.NET Overview
.NET Overview.NET Overview
.NET Overview
 
.Net slid
.Net slid.Net slid
.Net slid
 
Revealing C# 5
Revealing C# 5Revealing C# 5
Revealing C# 5
 
.Net + novas tecnologias + win8
.Net + novas tecnologias + win8.Net + novas tecnologias + win8
.Net + novas tecnologias + win8
 
Net Fundamentals
Net FundamentalsNet Fundamentals
Net Fundamentals
 
1.Philosophy of .NET
1.Philosophy of .NET1.Philosophy of .NET
1.Philosophy of .NET
 
C# c# for beginners crash course master c# programming fast and easy today
C# c# for beginners crash course master c# programming fast and easy todayC# c# for beginners crash course master c# programming fast and easy today
C# c# for beginners crash course master c# programming fast and easy today
 
Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net Fundamentals
 

More from Tuan Ngo

Introduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 enIntroduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 en
Tuan Ngo
 
14 generics and iterators
14   generics and iterators14   generics and iterators
14 generics and iterators
Tuan Ngo
 
13 collections
13   collections13   collections
13 collections
Tuan Ngo
 
11 exception handling
11   exception handling11   exception handling
11 exception handling
Tuan Ngo
 
12 events and delegates
12   events and delegates12   events and delegates
12 events and delegates
Tuan Ngo
 
9 properties & indexers
9   properties & indexers9   properties & indexers
9 properties & indexers
Tuan Ngo
 
10 namespace
10  namespace10  namespace
10 namespace
Tuan Ngo
 
8 abstract classes and interfaces
8   abstract classes and interfaces 8   abstract classes and interfaces
8 abstract classes and interfaces
Tuan Ngo
 
7 inheritance and polymorphism
7   inheritance and polymorphism7   inheritance and polymorphism
7 inheritance and polymorphism
Tuan Ngo
 
6 class and methods
6    class and methods6    class and methods
6 class and methods
Tuan Ngo
 
3 statements and operators
3   statements and operators3   statements and operators
3 statements and operators
Tuan Ngo
 
4 c# programming constructs
4   c# programming constructs4   c# programming constructs
4 c# programming constructs
Tuan Ngo
 
1 get started with c#
1   get started with c#1   get started with c#
1 get started with c#
Tuan Ngo
 
2 variables and data types
2   variables and data types2   variables and data types
2 variables and data types
Tuan Ngo
 

More from Tuan Ngo (20)

Introduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 enIntroduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 en
 
14 generics and iterators
14   generics and iterators14   generics and iterators
14 generics and iterators
 
13 collections
13   collections13   collections
13 collections
 
11 exception handling
11   exception handling11   exception handling
11 exception handling
 
12 events and delegates
12   events and delegates12   events and delegates
12 events and delegates
 
9 properties & indexers
9   properties & indexers9   properties & indexers
9 properties & indexers
 
10 namespace
10  namespace10  namespace
10 namespace
 
8 abstract classes and interfaces
8   abstract classes and interfaces 8   abstract classes and interfaces
8 abstract classes and interfaces
 
7 inheritance and polymorphism
7   inheritance and polymorphism7   inheritance and polymorphism
7 inheritance and polymorphism
 
5 arrays
5   arrays5   arrays
5 arrays
 
6 class and methods
6    class and methods6    class and methods
6 class and methods
 
3 statements and operators
3   statements and operators3   statements and operators
3 statements and operators
 
4 c# programming constructs
4   c# programming constructs4   c# programming constructs
4 c# programming constructs
 
1 get started with c#
1   get started with c#1   get started with c#
1 get started with c#
 
2 variables and data types
2   variables and data types2   variables and data types
2 variables and data types
 
Jdbc 7
Jdbc 7Jdbc 7
Jdbc 7
 
Jdbc 6
Jdbc 6Jdbc 6
Jdbc 6
 
Jdbc 3
Jdbc 3Jdbc 3
Jdbc 3
 
Jdbc 2
Jdbc 2Jdbc 2
Jdbc 2
 
Php
PhpPhp
Php
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
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
Safe Software
 

Recently uploaded (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
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
 
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, ...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

Net framework

  • 1. Introduction to .NET Framework 3.5 and C# 3.0 Programming in C# tnngo2@gmail.com
  • 2. A look back … 3.5 3.0 .NET 1.0 .NET 1.1 .NET 2.0 .NET 4 2002 2003 2005-08 2008 CTP CLR 1.0 CLR 1.1 CLR 2.0 CLR 4
  • 3. Architecture Win And WPF DLR ASP.NET WCF LINQ Forms more! Base Class Libraries The CLR JIT & Garbage Security Exception Loader & NGEN Collector Model Handling Binder
  • 4. JIT Interpreted Static compilation compilation in execution before executing Just-in-time Compilation hybrid approach
  • 5. NGEN use native image from cache instead using JIT compilation
  • 6. Loader & Binder locating assemblies at run-time and binding to them.
  • 7. WPF – Windows Presentation Foundation graphical subsystem for rendering UI in windows-based application Silverlight utilizes WPF to provide embedded web controls comparable to Adobe Flash but more focus on an UI object model and less on animation.
  • 8. WCF – Windows Communication Foundation designing and deploying distributed applications under services- oriented architecture (SOA) implementation set of principle and methodologies for interoperable application
  • 9. DLR – Dynamic language runtime a runtime environment that adds a set of services for dynamic languages to the common language runtime (CLR) Dynamic language identify the type of object at runtime whereas in statically type languages must specify object type at design time https://gist.github.com/2627105
  • 10. New features of C# 3.0
  • 11. Implicitly Typed Local Variables declare variables without specifying the type at design time Must be declared and initialized at the same time. var age; // Error, no initializer to infer the data type var age = 5; // Valid Cannot used as a return type and argument of method. Not possible for multiple declaration var age = 1, genre = “male”; // Error
  • 12. Object Initializers Creates an object and initialize its fields and properties without a constructor https://gist.github.com/2627433
  • 13. Auto-implemented Properties Creates an object and initialize its fields and properties without a constructor public string HouseName { get; set; }
  • 14. Extension Methods Allows you to extend an existing type with new functionality without directly modifying those types Are static methods that have to be declared in a static class Declare an extension method by specifying the first parameter with this keyword static return-type MethodName (this type obj, param-list) https://gist.github.com/2627468
  • 15. Collection Initializers ClassName objName = new CollectionClassName{ collection-initializer }
  • 16. Predefined Generic Delegates Func<T, TResult>() Delegate Represents a method having one parameters type T and returns a value of type TResult public delegate TResult Func<TResult>() https://gist.github.com/2627640
  • 17. Lambda Expressions is an alternative to anonymous methods. parameter-list => expression or statements https://gist.github.com/2633475