SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
Anonymous
    Methods,
Partial Types and
 Nullable Types
            Programming in C#


               tnngo2@gmail.com
Anonymous Methods
Anonymous Methods

     an inline nameless block of code.
Features

      accept parameters

      ref, out, generic type

      cannot include jump statements such as goto and break
Benefits

      No separate named methods

      Reduced number of methods

      Better understanding
Implementation

     Anonymous methods are not given any return type

     Anonymous methods are not prefixed with access modifiers


     https://gist.github.com/2586919
Referencing multiple anonymous methods

      https://gist.github.com/2586945
Passing parameters

      https://gist.github.com/2586982
Partial Types
Partial Types

       indicates that other parts of the class, struct or interface can be
       defined in different files or namespaces.

       All the parts will be formed to the final type at compile time.
Partial type?

       working on large projects, multiple programmers work on one class.

       working with automatically generated source, code can be added to
       the class without modifying the source file.
Implementation

     Each of the partial parts of the code must have the same access
     modifier


     if a part of code is declared as abstract and others are declared as
     public => the entire code is considered abstract.
     Same as sealed class.



     https://gist.github.com/2592542
Implementation (cont.)

      Partial Class
      https://gist.github.com/2592720
Question
Question
Nullable Types
Nullable types?

      Before C# 2.0, only reference type could be null
Nullable types

      Null values can be defined for the value types.

      instance of the System.Nullable<T> struct.
Implementation

     Nullable types have two properties:
              HasValue
              Value

     can also use the == and != operators
              if (x != null) y = x;

     https://gist.github.com/2592834
Implementation (cont.)

      Nullable types in Expression
      https://gist.github.com/2592857
?? Operator

     assign a nullable type to a non-nullable type.

     https://gist.github.com/2592875

Weitere ähnliche Inhalte

Was ist angesagt?

Jfokus functional groovy
Jfokus functional groovyJfokus functional groovy
Jfokus functional groovyAndres Almiray
 
Android clean architecture workshop 3h edition
Android clean architecture workshop 3h editionAndroid clean architecture workshop 3h edition
Android clean architecture workshop 3h editionJorge Ortiz
 
Acceptance Test Drive Development with Robot Framework
Acceptance Test Drive Development with Robot FrameworkAcceptance Test Drive Development with Robot Framework
Acceptance Test Drive Development with Robot FrameworkRamdhan Hidayat
 
Introduction to Robot Framework
Introduction to Robot FrameworkIntroduction to Robot Framework
Introduction to Robot FrameworkCarl Su
 
C# programming constructors
C# programming  constructorsC# programming  constructors
C# programming constructors성진 원
 
Effective c# part1
Effective c# part1Effective c# part1
Effective c# part1Yuriy Seniuk
 
Put the Tests Before the Code
Put the Tests Before the CodePut the Tests Before the Code
Put the Tests Before the CodeMike Clement
 
ATDD Using Robot Framework
ATDD Using Robot FrameworkATDD Using Robot Framework
ATDD Using Robot FrameworkPekka Klärck
 
Csharp introduction
Csharp introductionCsharp introduction
Csharp introductionSireesh K
 
C++ to java
C++ to javaC++ to java
C++ to javaAjmal Ak
 
Robot framework
Robot frameworkRobot framework
Robot frameworkboriau
 
【Edd workshop@140725】TDD introduction_Andy Huang
【Edd workshop@140725】TDD introduction_Andy Huang 【Edd workshop@140725】TDD introduction_Andy Huang
【Edd workshop@140725】TDD introduction_Andy Huang EZTABLE
 
JDD 2017: Kotlin for Java developers (Tomasz Kleszczyński)
JDD 2017: Kotlin for Java developers (Tomasz Kleszczyński)JDD 2017: Kotlin for Java developers (Tomasz Kleszczyński)
JDD 2017: Kotlin for Java developers (Tomasz Kleszczyński)PROIDEA
 
New c sharp4_features_part_v
New c sharp4_features_part_vNew c sharp4_features_part_v
New c sharp4_features_part_vNico Ludwig
 
The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...
The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...
The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...ITCamp
 
Academy PRO: React JS. Typescript
Academy PRO: React JS. TypescriptAcademy PRO: React JS. Typescript
Academy PRO: React JS. TypescriptBinary Studio
 
Introduction to Robot Framework – Exove
Introduction to Robot Framework – ExoveIntroduction to Robot Framework – Exove
Introduction to Robot Framework – ExoveExove
 

Was ist angesagt? (20)

Jfokus functional groovy
Jfokus functional groovyJfokus functional groovy
Jfokus functional groovy
 
Android clean architecture workshop 3h edition
Android clean architecture workshop 3h editionAndroid clean architecture workshop 3h edition
Android clean architecture workshop 3h edition
 
Acceptance Test Drive Development with Robot Framework
Acceptance Test Drive Development with Robot FrameworkAcceptance Test Drive Development with Robot Framework
Acceptance Test Drive Development with Robot Framework
 
Introduction to Robot Framework
Introduction to Robot FrameworkIntroduction to Robot Framework
Introduction to Robot Framework
 
C# programming constructors
C# programming  constructorsC# programming  constructors
C# programming constructors
 
Effective c# part1
Effective c# part1Effective c# part1
Effective c# part1
 
Put the Tests Before the Code
Put the Tests Before the CodePut the Tests Before the Code
Put the Tests Before the Code
 
ATDD Using Robot Framework
ATDD Using Robot FrameworkATDD Using Robot Framework
ATDD Using Robot Framework
 
Csharp introduction
Csharp introductionCsharp introduction
Csharp introduction
 
C++ to java
C++ to javaC++ to java
C++ to java
 
Robot framework
Robot frameworkRobot framework
Robot framework
 
【Edd workshop@140725】TDD introduction_Andy Huang
【Edd workshop@140725】TDD introduction_Andy Huang 【Edd workshop@140725】TDD introduction_Andy Huang
【Edd workshop@140725】TDD introduction_Andy Huang
 
Unit testing_pps
Unit testing_ppsUnit testing_pps
Unit testing_pps
 
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan PeshovJavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
 
JDD 2017: Kotlin for Java developers (Tomasz Kleszczyński)
JDD 2017: Kotlin for Java developers (Tomasz Kleszczyński)JDD 2017: Kotlin for Java developers (Tomasz Kleszczyński)
JDD 2017: Kotlin for Java developers (Tomasz Kleszczyński)
 
FRP with Ractive and RxJS
FRP with Ractive and RxJSFRP with Ractive and RxJS
FRP with Ractive and RxJS
 
New c sharp4_features_part_v
New c sharp4_features_part_vNew c sharp4_features_part_v
New c sharp4_features_part_v
 
The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...
The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...
The Roslyn Compiler: Look at Your Code from a Different Perspective (Raffaele...
 
Academy PRO: React JS. Typescript
Academy PRO: React JS. TypescriptAcademy PRO: React JS. Typescript
Academy PRO: React JS. Typescript
 
Introduction to Robot Framework – Exove
Introduction to Robot Framework – ExoveIntroduction to Robot Framework – Exove
Introduction to Robot Framework – Exove
 

Andere mochten auch

Net framework
Net frameworkNet framework
Net frameworkTuan Ngo
 
DATATYPE IN C# CSHARP.net
DATATYPE IN C# CSHARP.netDATATYPE IN C# CSHARP.net
DATATYPE IN C# CSHARP.netSireesh K
 
More Little Wonders of C#/.NET
More Little Wonders of C#/.NETMore Little Wonders of C#/.NET
More Little Wonders of C#/.NETBlackRabbitCoder
 
Data Type Conversion in C++
Data Type Conversion in C++Data Type Conversion in C++
Data Type Conversion in C++Danial Mirza
 
A Last Look
A Last LookA Last Look
A Last Lookjmori1
 
Data Integration And Visualization
Data Integration And VisualizationData Integration And Visualization
Data Integration And VisualizationIvan Ermilov
 
Internationlization
InternationlizationInternationlization
InternationlizationTuan Ngo
 
Power Notes Phase Changes
Power Notes   Phase ChangesPower Notes   Phase Changes
Power Notes Phase Changesjmori1
 
Pereira Transforming the agri food industry to develop rural livelihoods unde...
Pereira Transforming the agri food industry to develop rural livelihoods unde...Pereira Transforming the agri food industry to develop rural livelihoods unde...
Pereira Transforming the agri food industry to develop rural livelihoods unde...futureagricultures
 
Why choose a recruitment agency
Why choose a recruitment agencyWhy choose a recruitment agency
Why choose a recruitment agencyjohnarthur101
 
Presentation On Ganesh Chaturthi (Presented By- Rahul Ramchandra Gavade)
Presentation On Ganesh Chaturthi (Presented By- Rahul Ramchandra Gavade)Presentation On Ganesh Chaturthi (Presented By- Rahul Ramchandra Gavade)
Presentation On Ganesh Chaturthi (Presented By- Rahul Ramchandra Gavade)Rahul Gavade
 
How to write_language_compiler
How to write_language_compilerHow to write_language_compiler
How to write_language_compilerPhilip Zhong
 
Assessing enablers and constrainers of graduation
Assessing enablers and constrainers of graduationAssessing enablers and constrainers of graduation
Assessing enablers and constrainers of graduationfutureagricultures
 
The Revolution Has Started
The Revolution Has StartedThe Revolution Has Started
The Revolution Has StartedSarah Prevette
 
Researchers - recommendations from AIGLIA2014
Researchers - recommendations from AIGLIA2014Researchers - recommendations from AIGLIA2014
Researchers - recommendations from AIGLIA2014futureagricultures
 

Andere mochten auch (20)

Net framework
Net frameworkNet framework
Net framework
 
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#
 
A Last Look
A Last LookA Last Look
A Last Look
 
Data Integration And Visualization
Data Integration And VisualizationData Integration And Visualization
Data Integration And Visualization
 
Internationlization
InternationlizationInternationlization
Internationlization
 
Power Notes Phase Changes
Power Notes   Phase ChangesPower Notes   Phase Changes
Power Notes Phase Changes
 
Pereira Transforming the agri food industry to develop rural livelihoods unde...
Pereira Transforming the agri food industry to develop rural livelihoods unde...Pereira Transforming the agri food industry to develop rural livelihoods unde...
Pereira Transforming the agri food industry to develop rural livelihoods unde...
 
Why choose a recruitment agency
Why choose a recruitment agencyWhy choose a recruitment agency
Why choose a recruitment agency
 
Presentation On Ganesh Chaturthi (Presented By- Rahul Ramchandra Gavade)
Presentation On Ganesh Chaturthi (Presented By- Rahul Ramchandra Gavade)Presentation On Ganesh Chaturthi (Presented By- Rahul Ramchandra Gavade)
Presentation On Ganesh Chaturthi (Presented By- Rahul Ramchandra Gavade)
 
How to write_language_compiler
How to write_language_compilerHow to write_language_compiler
How to write_language_compiler
 
Assessing enablers and constrainers of graduation
Assessing enablers and constrainers of graduationAssessing enablers and constrainers of graduation
Assessing enablers and constrainers of graduation
 
The Revolution Has Started
The Revolution Has StartedThe Revolution Has Started
The Revolution Has Started
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
 
Unit 57 terminology becky doyle
Unit 57 terminology becky doyleUnit 57 terminology becky doyle
Unit 57 terminology becky doyle
 
Researchers - recommendations from AIGLIA2014
Researchers - recommendations from AIGLIA2014Researchers - recommendations from AIGLIA2014
Researchers - recommendations from AIGLIA2014
 
E rate
E rateE rate
E rate
 

Ähnlich wie Anonymous Methods, Partial Types and Nullable Types in C

C#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New FeaturesC#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New Featurestechfreak
 
Evolution of c# - by K.Jegan
Evolution of c# - by K.JeganEvolution of c# - by K.Jegan
Evolution of c# - by K.Jegantalenttransform
 
8 abstract classes and interfaces
8   abstract classes and interfaces 8   abstract classes and interfaces
8 abstract classes and interfaces Tuan Ngo
 
Perfomatix - iOS swift coding standards
Perfomatix - iOS swift coding standardsPerfomatix - iOS swift coding standards
Perfomatix - iOS swift coding standardsPerfomatix Solutions
 
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)Antonio Peric-Mazar
 
Object-oriented programming 3.pptx
Object-oriented programming 3.pptxObject-oriented programming 3.pptx
Object-oriented programming 3.pptxAdikhan27
 
How to do code review and use analysis tool in software development
How to do code review and use analysis tool in software developmentHow to do code review and use analysis tool in software development
How to do code review and use analysis tool in software developmentMitosis Technology
 
tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...
tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...
tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...Anil Sharma
 
6 class and methods
6    class and methods6    class and methods
6 class and methodsTuan Ngo
 
Module 2: C# 3.0 Language Enhancements (Slides)
Module 2: C# 3.0 Language Enhancements (Slides)Module 2: C# 3.0 Language Enhancements (Slides)
Module 2: C# 3.0 Language Enhancements (Slides)Mohamed Saleh
 

Ähnlich wie Anonymous Methods, Partial Types and Nullable Types in C (20)

C#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New FeaturesC#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New Features
 
csharp.docx
csharp.docxcsharp.docx
csharp.docx
 
C#.net Evolution part 1
C#.net Evolution part 1C#.net Evolution part 1
C#.net Evolution part 1
 
Evolution of c# - by K.Jegan
Evolution of c# - by K.JeganEvolution of c# - by K.Jegan
Evolution of c# - by K.Jegan
 
Essential language features
Essential language featuresEssential language features
Essential language features
 
TypeScript 101
TypeScript 101TypeScript 101
TypeScript 101
 
8 abstract classes and interfaces
8   abstract classes and interfaces 8   abstract classes and interfaces
8 abstract classes and interfaces
 
Perfomatix - iOS swift coding standards
Perfomatix - iOS swift coding standardsPerfomatix - iOS swift coding standards
Perfomatix - iOS swift coding standards
 
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
 
Object-oriented programming 3.pptx
Object-oriented programming 3.pptxObject-oriented programming 3.pptx
Object-oriented programming 3.pptx
 
How to do code review and use analysis tool in software development
How to do code review and use analysis tool in software developmentHow to do code review and use analysis tool in software development
How to do code review and use analysis tool in software development
 
tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...
tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...
tutorials-c-sharp_understanding-generic-anonymous-methods-and-lambda-expressi...
 
6 class and methods
6    class and methods6    class and methods
6 class and methods
 
C#ppt
C#pptC#ppt
C#ppt
 
LectureNotes-02-DSA
LectureNotes-02-DSALectureNotes-02-DSA
LectureNotes-02-DSA
 
Objects and Types C#
Objects and Types C#Objects and Types C#
Objects and Types C#
 
overview of c#
overview of c#overview of c#
overview of c#
 
Code quality
Code qualityCode quality
Code quality
 
Code Quality
Code QualityCode Quality
Code Quality
 
Module 2: C# 3.0 Language Enhancements (Slides)
Module 2: C# 3.0 Language Enhancements (Slides)Module 2: C# 3.0 Language Enhancements (Slides)
Module 2: C# 3.0 Language Enhancements (Slides)
 

Mehr von 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 enTuan Ngo
 
14 generics and iterators
14   generics and iterators14   generics and iterators
14 generics and iteratorsTuan Ngo
 
13 collections
13   collections13   collections
13 collectionsTuan Ngo
 
11 exception handling
11   exception handling11   exception handling
11 exception handlingTuan Ngo
 
12 events and delegates
12   events and delegates12   events and delegates
12 events and delegatesTuan Ngo
 
9 properties & indexers
9   properties & indexers9   properties & indexers
9 properties & indexersTuan Ngo
 
10 namespace
10  namespace10  namespace
10 namespaceTuan Ngo
 
7 inheritance and polymorphism
7   inheritance and polymorphism7   inheritance and polymorphism
7 inheritance and polymorphismTuan Ngo
 
3 statements and operators
3   statements and operators3   statements and operators
3 statements and operatorsTuan Ngo
 
4 c# programming constructs
4   c# programming constructs4   c# programming constructs
4 c# programming constructsTuan 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 typesTuan Ngo
 
Java swing tips
Java swing tipsJava swing tips
Java swing tipsTuan Ngo
 

Mehr von 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
 
7 inheritance and polymorphism
7   inheritance and polymorphism7   inheritance and polymorphism
7 inheritance and polymorphism
 
5 arrays
5   arrays5   arrays
5 arrays
 
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
 
Jdbc 1
Jdbc 1Jdbc 1
Jdbc 1
 
Java swing tips
Java swing tipsJava swing tips
Java swing tips
 

Kürzlich hochgeladen

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
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...Drew Madelung
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

Anonymous Methods, Partial Types and Nullable Types in C

  • 1. Anonymous Methods, Partial Types and Nullable Types Programming in C# tnngo2@gmail.com
  • 3. Anonymous Methods an inline nameless block of code.
  • 4. Features accept parameters ref, out, generic type cannot include jump statements such as goto and break
  • 5. Benefits No separate named methods Reduced number of methods Better understanding
  • 6. Implementation Anonymous methods are not given any return type Anonymous methods are not prefixed with access modifiers https://gist.github.com/2586919
  • 7. Referencing multiple anonymous methods https://gist.github.com/2586945
  • 8. Passing parameters https://gist.github.com/2586982
  • 10. Partial Types indicates that other parts of the class, struct or interface can be defined in different files or namespaces. All the parts will be formed to the final type at compile time.
  • 11. Partial type? working on large projects, multiple programmers work on one class. working with automatically generated source, code can be added to the class without modifying the source file.
  • 12. Implementation Each of the partial parts of the code must have the same access modifier if a part of code is declared as abstract and others are declared as public => the entire code is considered abstract. Same as sealed class. https://gist.github.com/2592542
  • 13. Implementation (cont.) Partial Class https://gist.github.com/2592720
  • 17. Nullable types? Before C# 2.0, only reference type could be null
  • 18. Nullable types Null values can be defined for the value types. instance of the System.Nullable<T> struct.
  • 19. Implementation Nullable types have two properties: HasValue Value can also use the == and != operators if (x != null) y = x; https://gist.github.com/2592834
  • 20. Implementation (cont.) Nullable types in Expression https://gist.github.com/2592857
  • 21. ?? Operator assign a nullable type to a non-nullable type. https://gist.github.com/2592875