SlideShare a Scribd company logo
C# IF ELSE STATEMENTS
The conditional statement if.. else in C# is using for check the conditions that we
provided in the head of if statement and making decision based on that condition.
The conditional statement examining the data using comparison operators as well as
logical operators. The else statement is optional , so we can use the statement in two
ways ;
if (condition)
{
statement;
}
else if (condition)
{
statement;
}
else
{
statement;
}
if (condition)
{
statement;
}
if (condition)
{
statement;
}
else
{
statement;
}
• CheckBox has two or three states. This control
provides a way for an option to be selected and
deselected independently of other options.
In this project
• Drag down a Label
• Drag down a checkbox (if the checkbox is checked the text of label
will be true, other wise it will be false.
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked == true)
{
label1.Text = "true";
}
else
{
label1.Text = "false";
}
}
private void button1_Click(object sender,
EventArgs e)
{
int a;
a = Convert.ToInt16(textBox1.Text);
if(a<49)
{ textBox2.Text = "fail"; }
else if (a > 49 && a < 60)
{ textBox2.Text = "E"; }
else if (a > 60 && a < 70)
{ textBox2.Text = "D"; }
else if (a > 70 && a < 80)
{ textBox2.Text = "C"; }
else if (a > 80 && a < 90)
{ textBox2.Text = "B"; }
else if (a > 90 && a <= 100)
{ textBox2.Text = "A"; }
}
Coding
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
if (radioButton1.Checked == true)
label1.Text = "You select radioButton11";
}
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
if (radioButton2.Checked == true)
label1.Text = "You select radioButton22";
}
Run
Vp lecture 3 ararat

More Related Content

What's hot

C# Basics
C# BasicsC# Basics
C# Basics
Binu Bhasuran
 
Select Clause
Select ClauseSelect Clause
Select Clause
Dhirendra Chauhan
 
Doe14 factorial3k fractional
Doe14 factorial3k fractionalDoe14 factorial3k fractional
Doe14 factorial3k fractional
Arif Rahman
 
Control statement-Selective
Control statement-SelectiveControl statement-Selective
Control statement-Selective
Nurul Zakiah Zamri Tan
 
Windows controls in c
Windows controls in cWindows controls in c
Windows controls in c
prabhu rajendran
 
Doe13 factorial3k blocking
Doe13 factorial3k blockingDoe13 factorial3k blocking
Doe13 factorial3k blocking
Arif Rahman
 
Doe10 factorial2k blocking
Doe10 factorial2k blockingDoe10 factorial2k blocking
Doe10 factorial2k blocking
Arif Rahman
 
Select case
Select caseSelect case
Select case
kuldeep94
 
ETL Validator Usecase -Metadata Comparison
ETL Validator Usecase -Metadata ComparisonETL Validator Usecase -Metadata Comparison
ETL Validator Usecase -Metadata Comparison
Vasavi Chinta
 
Vb decision making statements
Vb decision making statementsVb decision making statements
Vb decision making statements
pragya ratan
 
ETL Validator Usecase - Validating Measures, Counts with Variance
ETL Validator Usecase - Validating Measures, Counts with VarianceETL Validator Usecase - Validating Measures, Counts with Variance
ETL Validator Usecase - Validating Measures, Counts with Variance
Datagaps Inc
 
Selection Statements in C Programming
Selection Statements in C ProgrammingSelection Statements in C Programming
Selection Statements in C Programming
Kamal Acharya
 
Rapid postgresql learning, part 3
Rapid postgresql learning, part 3Rapid postgresql learning, part 3
Rapid postgresql learning, part 3
Ali MasudianPour
 
Decision statements in vb.net
Decision statements in vb.netDecision statements in vb.net
Decision statements in vb.net
ilakkiya
 
ETL Validator Usecase - Check for Mandatory Fields
ETL Validator Usecase - Check for Mandatory FieldsETL Validator Usecase - Check for Mandatory Fields
ETL Validator Usecase - Check for Mandatory Fields
Datagaps Inc
 
03a control structures
03a   control structures03a   control structures
03a control structures
Manzoor ALam
 
Computer programming - variables constants operators expressions and statements
Computer programming - variables constants operators expressions and statementsComputer programming - variables constants operators expressions and statements
Computer programming - variables constants operators expressions and statements
John Paul Espino
 
The Three Basic Selection Structures in C++ Programming Concepts
The Three Basic Selection Structures in C++ Programming ConceptsThe Three Basic Selection Structures in C++ Programming Concepts
The Three Basic Selection Structures in C++ Programming Concepts
Tech
 
Doe11 factorial2k fractional
Doe11 factorial2k fractionalDoe11 factorial2k fractional
Doe11 factorial2k fractional
Arif Rahman
 

What's hot (19)

C# Basics
C# BasicsC# Basics
C# Basics
 
Select Clause
Select ClauseSelect Clause
Select Clause
 
Doe14 factorial3k fractional
Doe14 factorial3k fractionalDoe14 factorial3k fractional
Doe14 factorial3k fractional
 
Control statement-Selective
Control statement-SelectiveControl statement-Selective
Control statement-Selective
 
Windows controls in c
Windows controls in cWindows controls in c
Windows controls in c
 
Doe13 factorial3k blocking
Doe13 factorial3k blockingDoe13 factorial3k blocking
Doe13 factorial3k blocking
 
Doe10 factorial2k blocking
Doe10 factorial2k blockingDoe10 factorial2k blocking
Doe10 factorial2k blocking
 
Select case
Select caseSelect case
Select case
 
ETL Validator Usecase -Metadata Comparison
ETL Validator Usecase -Metadata ComparisonETL Validator Usecase -Metadata Comparison
ETL Validator Usecase -Metadata Comparison
 
Vb decision making statements
Vb decision making statementsVb decision making statements
Vb decision making statements
 
ETL Validator Usecase - Validating Measures, Counts with Variance
ETL Validator Usecase - Validating Measures, Counts with VarianceETL Validator Usecase - Validating Measures, Counts with Variance
ETL Validator Usecase - Validating Measures, Counts with Variance
 
Selection Statements in C Programming
Selection Statements in C ProgrammingSelection Statements in C Programming
Selection Statements in C Programming
 
Rapid postgresql learning, part 3
Rapid postgresql learning, part 3Rapid postgresql learning, part 3
Rapid postgresql learning, part 3
 
Decision statements in vb.net
Decision statements in vb.netDecision statements in vb.net
Decision statements in vb.net
 
ETL Validator Usecase - Check for Mandatory Fields
ETL Validator Usecase - Check for Mandatory FieldsETL Validator Usecase - Check for Mandatory Fields
ETL Validator Usecase - Check for Mandatory Fields
 
03a control structures
03a   control structures03a   control structures
03a control structures
 
Computer programming - variables constants operators expressions and statements
Computer programming - variables constants operators expressions and statementsComputer programming - variables constants operators expressions and statements
Computer programming - variables constants operators expressions and statements
 
The Three Basic Selection Structures in C++ Programming Concepts
The Three Basic Selection Structures in C++ Programming ConceptsThe Three Basic Selection Structures in C++ Programming Concepts
The Three Basic Selection Structures in C++ Programming Concepts
 
Doe11 factorial2k fractional
Doe11 factorial2k fractionalDoe11 factorial2k fractional
Doe11 factorial2k fractional
 

Similar to Vp lecture 3 ararat

Flow of Control
Flow of ControlFlow of Control
Flow of Control
Praveen M Jigajinni
 
Ch05.pdf
Ch05.pdfCh05.pdf
Vs c# lecture7
Vs c# lecture7Vs c# lecture7
Vs c# lecture7
Saman M. Almufti
 
Ch05-converted.pptx
Ch05-converted.pptxCh05-converted.pptx
Ch05-converted.pptx
ShivamChaturvedi67
 
Lecture 3 Conditionals, expressions and Variables
Lecture 3   Conditionals, expressions and VariablesLecture 3   Conditionals, expressions and Variables
Lecture 3 Conditionals, expressions and Variables
Syed Afaq Shah MACS CP
 
Control structures in C++ Programming Language
Control structures in C++ Programming LanguageControl structures in C++ Programming Language
Control structures in C++ Programming Language
Ahmad Idrees
 
Flow of control C ++ By TANUJ
Flow of control C ++ By TANUJFlow of control C ++ By TANUJ
Flow of control C ++ By TANUJ
TANUJ ⠀
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
Soran University
 
Control statements anil
Control statements anilControl statements anil
Control statements anil
Anil Dutt
 
Control Structures
Control StructuresControl Structures
Control Structures
Ghaffar Khan
 
Ppt lesson 08
Ppt lesson 08Ppt lesson 08
Ppt lesson 08
Linda Bodrie
 
Control structures i
Control structures i Control structures i
Control structures i
Ahmad Idrees
 
Conditonals.pdf
Conditonals.pdfConditonals.pdf
Conditonals.pdf
simrich7204
 
C UNIT-2 PREPARED Y M V BRAHMANANDA REDDY
C UNIT-2 PREPARED Y M V BRAHMANANDA REDDYC UNIT-2 PREPARED Y M V BRAHMANANDA REDDY
C UNIT-2 PREPARED Y M V BRAHMANANDA REDDY
Rajeshkumar Reddy
 
Selection statements
Selection statementsSelection statements
Selection statements
Harsh Dabas
 
Using decision statements
Using decision statementsUsing decision statements
Using decision statements
Stephen JE Ventura
 
Decision Controls in C++ Programming Lecture
Decision Controls in C++ Programming LectureDecision Controls in C++ Programming Lecture
Decision Controls in C++ Programming Lecture
TishaFayeMendoza
 
Unit_3A_If_Else_Switch and a if else statment example
Unit_3A_If_Else_Switch and a if else statment exampleUnit_3A_If_Else_Switch and a if else statment example
Unit_3A_If_Else_Switch and a if else statment example
umaghosal12101974
 
Dti2143 chap 4 control structures aka_selection
Dti2143 chap 4 control structures aka_selectionDti2143 chap 4 control structures aka_selection
Dti2143 chap 4 control structures aka_selection
alish sha
 
Dti2143 chap 4 control structures aka_selection
Dti2143 chap 4 control structures aka_selectionDti2143 chap 4 control structures aka_selection
Dti2143 chap 4 control structures aka_selection
alish sha
 

Similar to Vp lecture 3 ararat (20)

Flow of Control
Flow of ControlFlow of Control
Flow of Control
 
Ch05.pdf
Ch05.pdfCh05.pdf
Ch05.pdf
 
Vs c# lecture7
Vs c# lecture7Vs c# lecture7
Vs c# lecture7
 
Ch05-converted.pptx
Ch05-converted.pptxCh05-converted.pptx
Ch05-converted.pptx
 
Lecture 3 Conditionals, expressions and Variables
Lecture 3   Conditionals, expressions and VariablesLecture 3   Conditionals, expressions and Variables
Lecture 3 Conditionals, expressions and Variables
 
Control structures in C++ Programming Language
Control structures in C++ Programming LanguageControl structures in C++ Programming Language
Control structures in C++ Programming Language
 
Flow of control C ++ By TANUJ
Flow of control C ++ By TANUJFlow of control C ++ By TANUJ
Flow of control C ++ By TANUJ
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Control statements anil
Control statements anilControl statements anil
Control statements anil
 
Control Structures
Control StructuresControl Structures
Control Structures
 
Ppt lesson 08
Ppt lesson 08Ppt lesson 08
Ppt lesson 08
 
Control structures i
Control structures i Control structures i
Control structures i
 
Conditonals.pdf
Conditonals.pdfConditonals.pdf
Conditonals.pdf
 
C UNIT-2 PREPARED Y M V BRAHMANANDA REDDY
C UNIT-2 PREPARED Y M V BRAHMANANDA REDDYC UNIT-2 PREPARED Y M V BRAHMANANDA REDDY
C UNIT-2 PREPARED Y M V BRAHMANANDA REDDY
 
Selection statements
Selection statementsSelection statements
Selection statements
 
Using decision statements
Using decision statementsUsing decision statements
Using decision statements
 
Decision Controls in C++ Programming Lecture
Decision Controls in C++ Programming LectureDecision Controls in C++ Programming Lecture
Decision Controls in C++ Programming Lecture
 
Unit_3A_If_Else_Switch and a if else statment example
Unit_3A_If_Else_Switch and a if else statment exampleUnit_3A_If_Else_Switch and a if else statment example
Unit_3A_If_Else_Switch and a if else statment example
 
Dti2143 chap 4 control structures aka_selection
Dti2143 chap 4 control structures aka_selectionDti2143 chap 4 control structures aka_selection
Dti2143 chap 4 control structures aka_selection
 
Dti2143 chap 4 control structures aka_selection
Dti2143 chap 4 control structures aka_selectionDti2143 chap 4 control structures aka_selection
Dti2143 chap 4 control structures aka_selection
 

More from Saman M. Almufti

Lecture 7- domain name
Lecture  7- domain nameLecture  7- domain name
Lecture 7- domain name
Saman M. Almufti
 
Vp lecture 11 ararat
Vp lecture 11 araratVp lecture 11 ararat
Vp lecture 11 ararat
Saman M. Almufti
 
Vp lecture 10 ararat
Vp lecture 10 araratVp lecture 10 ararat
Vp lecture 10 ararat
Saman M. Almufti
 
Vp lecture 12 ararat
Vp lecture 12 araratVp lecture 12 ararat
Vp lecture 12 ararat
Saman M. Almufti
 
Vp lecture 9 ararat
Vp lecture 9 araratVp lecture 9 ararat
Vp lecture 9 ararat
Saman M. Almufti
 
Lecture 6- http
Lecture  6- httpLecture  6- http
Lecture 6- http
Saman M. Almufti
 
Lecture 5- url-dns
Lecture  5- url-dnsLecture  5- url-dns
Lecture 5- url-dns
Saman M. Almufti
 
Vp lecture 7 ararat
Vp lecture 7 araratVp lecture 7 ararat
Vp lecture 7 ararat
Saman M. Almufti
 
Lecture 4- ip
Lecture  4- ipLecture  4- ip
Lecture 4- ip
Saman M. Almufti
 
Vp lecture 6 ararat
Vp lecture 6 araratVp lecture 6 ararat
Vp lecture 6 ararat
Saman M. Almufti
 
Vp lecture 5 ararat
Vp lecture 5 araratVp lecture 5 ararat
Vp lecture 5 ararat
Saman M. Almufti
 
Lecture 3- tcp-ip
Lecture  3- tcp-ipLecture  3- tcp-ip
Lecture 3- tcp-ip
Saman M. Almufti
 
Vp lecture 4 ararat
Vp lecture 4 araratVp lecture 4 ararat
Vp lecture 4 ararat
Saman M. Almufti
 
Lecture 2- terminology
Lecture  2- terminologyLecture  2- terminology
Lecture 2- terminology
Saman M. Almufti
 
Vp lecture 2 ararat
Vp lecture 2 araratVp lecture 2 ararat
Vp lecture 2 ararat
Saman M. Almufti
 
Vp lecture1 ararat
Vp lecture1 araratVp lecture1 ararat
Vp lecture1 ararat
Saman M. Almufti
 
Lecture 1- introduction
Lecture  1- introductionLecture  1- introduction
Lecture 1- introduction
Saman M. Almufti
 
Vs c# lecture12
Vs c# lecture12Vs c# lecture12
Vs c# lecture12
Saman M. Almufti
 
Vs c# lecture11
Vs c# lecture11Vs c# lecture11
Vs c# lecture11
Saman M. Almufti
 
Vs c# lecture10
Vs c# lecture10Vs c# lecture10
Vs c# lecture10
Saman M. Almufti
 

More from Saman M. Almufti (20)

Lecture 7- domain name
Lecture  7- domain nameLecture  7- domain name
Lecture 7- domain name
 
Vp lecture 11 ararat
Vp lecture 11 araratVp lecture 11 ararat
Vp lecture 11 ararat
 
Vp lecture 10 ararat
Vp lecture 10 araratVp lecture 10 ararat
Vp lecture 10 ararat
 
Vp lecture 12 ararat
Vp lecture 12 araratVp lecture 12 ararat
Vp lecture 12 ararat
 
Vp lecture 9 ararat
Vp lecture 9 araratVp lecture 9 ararat
Vp lecture 9 ararat
 
Lecture 6- http
Lecture  6- httpLecture  6- http
Lecture 6- http
 
Lecture 5- url-dns
Lecture  5- url-dnsLecture  5- url-dns
Lecture 5- url-dns
 
Vp lecture 7 ararat
Vp lecture 7 araratVp lecture 7 ararat
Vp lecture 7 ararat
 
Lecture 4- ip
Lecture  4- ipLecture  4- ip
Lecture 4- ip
 
Vp lecture 6 ararat
Vp lecture 6 araratVp lecture 6 ararat
Vp lecture 6 ararat
 
Vp lecture 5 ararat
Vp lecture 5 araratVp lecture 5 ararat
Vp lecture 5 ararat
 
Lecture 3- tcp-ip
Lecture  3- tcp-ipLecture  3- tcp-ip
Lecture 3- tcp-ip
 
Vp lecture 4 ararat
Vp lecture 4 araratVp lecture 4 ararat
Vp lecture 4 ararat
 
Lecture 2- terminology
Lecture  2- terminologyLecture  2- terminology
Lecture 2- terminology
 
Vp lecture 2 ararat
Vp lecture 2 araratVp lecture 2 ararat
Vp lecture 2 ararat
 
Vp lecture1 ararat
Vp lecture1 araratVp lecture1 ararat
Vp lecture1 ararat
 
Lecture 1- introduction
Lecture  1- introductionLecture  1- introduction
Lecture 1- introduction
 
Vs c# lecture12
Vs c# lecture12Vs c# lecture12
Vs c# lecture12
 
Vs c# lecture11
Vs c# lecture11Vs c# lecture11
Vs c# lecture11
 
Vs c# lecture10
Vs c# lecture10Vs c# lecture10
Vs c# lecture10
 

Recently uploaded

Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
maazsz111
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
marufrahmanstratejm
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 

Recently uploaded (20)

Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 

Vp lecture 3 ararat

  • 1.
  • 2. C# IF ELSE STATEMENTS The conditional statement if.. else in C# is using for check the conditions that we provided in the head of if statement and making decision based on that condition. The conditional statement examining the data using comparison operators as well as logical operators. The else statement is optional , so we can use the statement in two ways ; if (condition) { statement; } else if (condition) { statement; } else { statement; } if (condition) { statement; } if (condition) { statement; } else { statement; }
  • 3. • CheckBox has two or three states. This control provides a way for an option to be selected and deselected independently of other options.
  • 4. In this project • Drag down a Label • Drag down a checkbox (if the checkbox is checked the text of label will be true, other wise it will be false. private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (checkBox1.Checked == true) { label1.Text = "true"; } else { label1.Text = "false"; } }
  • 5. private void button1_Click(object sender, EventArgs e) { int a; a = Convert.ToInt16(textBox1.Text); if(a<49) { textBox2.Text = "fail"; } else if (a > 49 && a < 60) { textBox2.Text = "E"; } else if (a > 60 && a < 70) { textBox2.Text = "D"; } else if (a > 70 && a < 80) { textBox2.Text = "C"; } else if (a > 80 && a < 90) { textBox2.Text = "B"; } else if (a > 90 && a <= 100) { textBox2.Text = "A"; } }
  • 6.
  • 7. Coding private void radioButton1_CheckedChanged(object sender, EventArgs e) { if (radioButton1.Checked == true) label1.Text = "You select radioButton11"; } private void radioButton2_CheckedChanged(object sender, EventArgs e) { if (radioButton2.Checked == true) label1.Text = "You select radioButton22"; }
  • 8. Run