SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
C# programming
   Constructs
          Programming in C#




             tnngo2@gmail.com
Selection Constructs
Selection Constructs

      if…else…if
      http://pastebin.com/cRw1mL1d
Selection Constructs

      Switch…case
      http://pastebin.com/7kNQwQaY




      The expression must be int, char,
      byte or short.
Loop Constructs
Selection Constructs

      while (pre-test loop)
      http://pastebin.com/1WPRbaed
Selection Constructs

      do-while(post-test loop)
      http://pastebin.com/jnNvyB07
Selection Constructs

      for(post-test loop)
      https://gist.github.com/2318139
Selection Constructs

      nested for

      for(initial, condition, increment/decrement)
      {
                for(initial, condition, increment/decrement)
                {
                          ….
                }
      }
Selection Constructs

      foreach
      https://gist.github.com/2318146

      foreach(<datatype> <indentifier> in <list>)
      {
      }
Jump Statements
Break

        is used in the selection and loop constructs.
        http://pastebin.com/1ENSu2f9
Continue

     mostly used in loop constructs.
     end the current iteration of the loop and begin another
     http://pastebin.com/QzZSVZhP
Goto

       directly execute a labeled statement or a labeled block
       of statement

       cannot use goto inside for, while or do-while loops.
       http://pastebin.com/1Pk2f7fE
Return

Mais conteúdo relacionado

Mais procurados

Sockets in nach0s
Sockets in nach0sSockets in nach0s
Sockets in nach0s
naniix21_3
 
Reactive extensions itjam
Reactive extensions itjamReactive extensions itjam
Reactive extensions itjam
Ciklum Ukraine
 

Mais procurados (17)

Transformer and BERT
Transformer and BERTTransformer and BERT
Transformer and BERT
 
5b Virtual Wall Papadimitriou
5b Virtual Wall Papadimitriou5b Virtual Wall Papadimitriou
5b Virtual Wall Papadimitriou
 
Java8 bench gc
Java8 bench gcJava8 bench gc
Java8 bench gc
 
Free FreeRTOS Course-Task Management
Free FreeRTOS Course-Task ManagementFree FreeRTOS Course-Task Management
Free FreeRTOS Course-Task Management
 
unittest in 5 minutes
unittest in 5 minutesunittest in 5 minutes
unittest in 5 minutes
 
Android & PostgreSQL
Android & PostgreSQLAndroid & PostgreSQL
Android & PostgreSQL
 
Mc qs threads
Mc qs threadsMc qs threads
Mc qs threads
 
PGTop for Android: Things I learned making this app
PGTop for Android: Things I learned making this appPGTop for Android: Things I learned making this app
PGTop for Android: Things I learned making this app
 
Tweaking Google TV emulator
Tweaking Google TV emulatorTweaking Google TV emulator
Tweaking Google TV emulator
 
Sockets in nach0s
Sockets in nach0sSockets in nach0s
Sockets in nach0s
 
Operating systems
Operating systemsOperating systems
Operating systems
 
Operating systems
Operating systemsOperating systems
Operating systems
 
java Statements
java Statementsjava Statements
java Statements
 
Maf3 - Part 1
Maf3 - Part 1Maf3 - Part 1
Maf3 - Part 1
 
GTAC 2014: What lurks in test suites?
GTAC 2014: What lurks in test suites?GTAC 2014: What lurks in test suites?
GTAC 2014: What lurks in test suites?
 
Reactive extensions itjam
Reactive extensions itjamReactive extensions itjam
Reactive extensions itjam
 
Benchmarking on JVM
Benchmarking on JVMBenchmarking on JVM
Benchmarking on JVM
 

Destaque

Horrible Jobs
Horrible JobsHorrible Jobs
Horrible Jobs
mkm29
 
Мой город - Кострома, №15
Мой город - Кострома, №15Мой город - Кострома, №15
Мой город - Кострома, №15
Мой город
 
Подготовка ребенка к школе
Подготовка ребенка к школеПодготовка ребенка к школе
Подготовка ребенка к школе
elvira38
 
OTTO GUEVARA NO COBRA SALARIO COMO CANDIDATO
OTTO GUEVARA NO COBRA SALARIO COMO CANDIDATOOTTO GUEVARA NO COBRA SALARIO COMO CANDIDATO
OTTO GUEVARA NO COBRA SALARIO COMO CANDIDATO
Douglas Caamaño Quirós
 
Kiwanis presentation 06-07-2011
Kiwanis presentation 06-07-2011Kiwanis presentation 06-07-2011
Kiwanis presentation 06-07-2011
bhmiomaha
 
Educ 2190 mathematics stage 5 – year 10 – statistics
Educ 2190   mathematics stage 5 – year 10 – statisticsEduc 2190   mathematics stage 5 – year 10 – statistics
Educ 2190 mathematics stage 5 – year 10 – statistics
Matthew Lovegrove
 
Charles dickens power point pressentation
Charles dickens power point pressentationCharles dickens power point pressentation
Charles dickens power point pressentation
lynnbeach86
 
Elements, Compounds & Mixtures-- Spring 2012
Elements, Compounds & Mixtures-- Spring 2012Elements, Compounds & Mixtures-- Spring 2012
Elements, Compounds & Mixtures-- Spring 2012
jmori1
 
Scaling identity to internet proportions
Scaling identity to internet proportionsScaling identity to internet proportions
Scaling identity to internet proportions
OracleIDM
 
Mind map от «Полмиллиона юзеров в онлайне без падений: оптимизация высокона...
Mind map от «Полмиллиона юзеров в онлайне без падений: оптимизация высокона...Mind map от «Полмиллиона юзеров в онлайне без падений: оптимизация высокона...
Mind map от «Полмиллиона юзеров в онлайне без падений: оптимизация высокона...
Sergey Xek
 
Foursimple things that can derail your career & how to take care of them
Foursimple things that can derail your career & how to take care of themFoursimple things that can derail your career & how to take care of them
Foursimple things that can derail your career & how to take care of them
Raymond J. Ramirez DVM speaking
 

Destaque (20)

Constructs (Programming Methodology)
Constructs (Programming Methodology)Constructs (Programming Methodology)
Constructs (Programming Methodology)
 
UNIX - Class3 - Programming Constructs
UNIX - Class3 - Programming ConstructsUNIX - Class3 - Programming Constructs
UNIX - Class3 - Programming Constructs
 
Programming Methodology
Programming MethodologyProgramming Methodology
Programming Methodology
 
Programming Methodology
Programming MethodologyProgramming Methodology
Programming Methodology
 
Horrible Jobs
Horrible JobsHorrible Jobs
Horrible Jobs
 
Мой город - Кострома, №15
Мой город - Кострома, №15Мой город - Кострома, №15
Мой город - Кострома, №15
 
Подготовка ребенка к школе
Подготовка ребенка к школеПодготовка ребенка к школе
Подготовка ребенка к школе
 
OTTO GUEVARA NO COBRA SALARIO COMO CANDIDATO
OTTO GUEVARA NO COBRA SALARIO COMO CANDIDATOOTTO GUEVARA NO COBRA SALARIO COMO CANDIDATO
OTTO GUEVARA NO COBRA SALARIO COMO CANDIDATO
 
Gao report
Gao reportGao report
Gao report
 
ออกแบบและพัฒนาโครงงาน บทที่ 2
ออกแบบและพัฒนาโครงงาน บทที่ 2ออกแบบและพัฒนาโครงงาน บทที่ 2
ออกแบบและพัฒนาโครงงาน บทที่ 2
 
Wayne Dunn presents to World Bank Development Marketplace on the South Africa...
Wayne Dunn presents to World Bank Development Marketplace on the South Africa...Wayne Dunn presents to World Bank Development Marketplace on the South Africa...
Wayne Dunn presents to World Bank Development Marketplace on the South Africa...
 
Kiwanis presentation 06-07-2011
Kiwanis presentation 06-07-2011Kiwanis presentation 06-07-2011
Kiwanis presentation 06-07-2011
 
Educ 2190 mathematics stage 5 – year 10 – statistics
Educ 2190   mathematics stage 5 – year 10 – statisticsEduc 2190   mathematics stage 5 – year 10 – statistics
Educ 2190 mathematics stage 5 – year 10 – statistics
 
公共施設白書を知ろう会 資料
公共施設白書を知ろう会 資料公共施設白書を知ろう会 資料
公共施設白書を知ろう会 資料
 
Charles dickens power point pressentation
Charles dickens power point pressentationCharles dickens power point pressentation
Charles dickens power point pressentation
 
Elements, Compounds & Mixtures-- Spring 2012
Elements, Compounds & Mixtures-- Spring 2012Elements, Compounds & Mixtures-- Spring 2012
Elements, Compounds & Mixtures-- Spring 2012
 
Compete Group Evaluations
Compete Group EvaluationsCompete Group Evaluations
Compete Group Evaluations
 
Scaling identity to internet proportions
Scaling identity to internet proportionsScaling identity to internet proportions
Scaling identity to internet proportions
 
Mind map от «Полмиллиона юзеров в онлайне без падений: оптимизация высокона...
Mind map от «Полмиллиона юзеров в онлайне без падений: оптимизация высокона...Mind map от «Полмиллиона юзеров в онлайне без падений: оптимизация высокона...
Mind map от «Полмиллиона юзеров в онлайне без падений: оптимизация высокона...
 
Foursimple things that can derail your career & how to take care of them
Foursimple things that can derail your career & how to take care of themFoursimple things that can derail your career & how to take care of them
Foursimple things that can derail your career & how to take care of them
 

Semelhante a 4 c# programming constructs

Other Approaches (Concurrency)
Other Approaches (Concurrency)Other Approaches (Concurrency)
Other Approaches (Concurrency)
Sri Prasanna
 
Fundamentals of programming finals.ajang
Fundamentals of programming finals.ajangFundamentals of programming finals.ajang
Fundamentals of programming finals.ajang
Jaricka Angelyd Marquez
 

Semelhante a 4 c# programming constructs (20)

(Slightly) Smarter Smart Pointers
(Slightly) Smarter Smart Pointers(Slightly) Smarter Smart Pointers
(Slightly) Smarter Smart Pointers
 
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
 
Other Approaches (Concurrency)
Other Approaches (Concurrency)Other Approaches (Concurrency)
Other Approaches (Concurrency)
 
Summary of C++17 features
Summary of C++17 featuresSummary of C++17 features
Summary of C++17 features
 
Dead-Simple Async Control Flow with Coroutines
Dead-Simple Async Control Flow with CoroutinesDead-Simple Async Control Flow with Coroutines
Dead-Simple Async Control Flow with Coroutines
 
Core Java Programming Language (JSE) : Chapter IV - Expressions and Flow Cont...
Core Java Programming Language (JSE) : Chapter IV - Expressions and Flow Cont...Core Java Programming Language (JSE) : Chapter IV - Expressions and Flow Cont...
Core Java Programming Language (JSE) : Chapter IV - Expressions and Flow Cont...
 
Monitoring Kafka w/ Prometheus
Monitoring Kafka w/ PrometheusMonitoring Kafka w/ Prometheus
Monitoring Kafka w/ Prometheus
 
Introducing Playwright's New Test Runner
Introducing Playwright's New Test RunnerIntroducing Playwright's New Test Runner
Introducing Playwright's New Test Runner
 
Core Java Programming Language (JSE) : Chapter VIII - Exceptions and Assertions
Core Java Programming Language (JSE) : Chapter VIII - Exceptions and AssertionsCore Java Programming Language (JSE) : Chapter VIII - Exceptions and Assertions
Core Java Programming Language (JSE) : Chapter VIII - Exceptions and Assertions
 
Fundamentals of programming finals.ajang
Fundamentals of programming finals.ajangFundamentals of programming finals.ajang
Fundamentals of programming finals.ajang
 
Testing Django Applications
Testing Django ApplicationsTesting Django Applications
Testing Django Applications
 
Effective java item 80 and 81
Effective java   item 80 and 81Effective java   item 80 and 81
Effective java item 80 and 81
 
Concurrency patterns
Concurrency patternsConcurrency patterns
Concurrency patterns
 
Native Java with GraalVM
Native Java with GraalVMNative Java with GraalVM
Native Java with GraalVM
 
Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++Kirk Shoop, Reactive programming in C++
Kirk Shoop, Reactive programming in C++
 
Reactive programming with Rxjava
Reactive programming with RxjavaReactive programming with Rxjava
Reactive programming with Rxjava
 
from Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu Worksfrom Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu Works
 
Python Evolution
Python EvolutionPython Evolution
Python Evolution
 
Struts2 in a nutshell
Struts2 in a nutshellStruts2 in a nutshell
Struts2 in a nutshell
 
Golang dot-testing-lite
Golang dot-testing-liteGolang dot-testing-lite
Golang dot-testing-lite
 

Mais de 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
 
Net framework
Net frameworkNet framework
Net framework
Tuan Ngo
 
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
 
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
 
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
 

Mais de 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
 
Net framework
Net frameworkNet framework
Net framework
 
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
 
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
 
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
 

Último

Último (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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)
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
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 - 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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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...
 
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
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
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
 
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
 

4 c# programming constructs