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;
}
From the project menu in the C# menu bar
• Click the Add References
• Chose assemblies => Framework
• Search for System.Speach in the framework list
• Chose System.speech and click ok
• Before adding the code we have to add
( ) to
the beginning of the program.
Example:- using system.speech to read (text to speech)
what is written in the text box
From the project menu in the C# menu bar
• Add system.speech library
• Add textbox or richtextbox
• Add button
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Speech.Synthesis;
namespace WindowsFormsApplication20
{
public partial class Form1 : Form
{
SpeechSynthesizer p = new SpeechSynthesizer();
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
p.Speak(textBox1.Text);
}
}
}
Add using
System.Speech.
Synthesis;
Voice
button
trackbar for
increasing volume trackbar for
increasing Speed
Choosing Male And
Female
private void toolStripButton4_Click(object sender, EventArgs e)
{
SpeechSynthesizer sp = new SpeechSynthesizer();
sp.Volume = trackBar1.Value;
sp.Rate = trackBar2.Value;
if (comboBox1.Text=="Male")
{
sp.SelectVoiceByHints(VoiceGender.Male);
}
else
{
sp.SelectVoiceByHints(VoiceGender.Female);
}
sp.Speak(textBox1.Text);
}

More Related Content

What's hot

ETL Validator Usecase - Input/Output Fields Comparison
ETL Validator Usecase - Input/Output Fields ComparisonETL Validator Usecase - Input/Output Fields Comparison
ETL Validator Usecase - Input/Output Fields Comparison
Datagaps Inc
 
Unit testing and junit
Unit testing and junitUnit testing and junit
Unit testing and junit
Ömer Taşkın
 
Tutorial 6 how to edit the causal factors in stpa project
Tutorial 6 how to edit the causal factors in stpa projectTutorial 6 how to edit the causal factors in stpa project
Tutorial 6 how to edit the causal factors in stpa project
Asim Abdulkhaleq, Dr.rer.nat
 
1126640 question
1126640 question 1126640 question
1126640 question
lpss0513
 
Coverage analysis with "coverage"
Coverage analysis with "coverage"Coverage analysis with "coverage"
Coverage analysis with "coverage"
Hoffman Lab
 
ETL Validator Usecase - Data Profiling and Comparison
ETL Validator Usecase - Data Profiling and ComparisonETL Validator Usecase - Data Profiling and Comparison
ETL Validator Usecase - Data Profiling and Comparison
Datagaps Inc
 
Query parameterization in ETL Validator
Query parameterization in ETL ValidatorQuery parameterization in ETL Validator
Query parameterization in ETL Validator
Datagaps Inc
 
Getting from PsycINFO to an Unpublished Test
Getting from PsycINFO to an Unpublished TestGetting from PsycINFO to an Unpublished Test
Getting from PsycINFO to an Unpublished Test
this_shanti
 
Peering into the white box: A testers approach to Code Reviews
Peering into the white box: A testers approach to Code ReviewsPeering into the white box: A testers approach to Code Reviews
Peering into the white box: A testers approach to Code Reviews
Alan Page
 
FitNesse, An Introduction
FitNesse, An IntroductionFitNesse, An Introduction
FitNesse, An Introduction
Chalana Kahandawala
 
BI-Validator Usecase - Stress Test Plan
BI-Validator Usecase - Stress Test PlanBI-Validator Usecase - Stress Test Plan
BI-Validator Usecase - Stress Test Plan
Datagaps Inc
 
ETL Validator Usecase - Transformation logic in input data source
ETL Validator Usecase - Transformation logic in input data sourceETL Validator Usecase - Transformation logic in input data source
ETL Validator Usecase - Transformation logic in input data source
Datagaps Inc
 
Fitnesse Testing Framework
Fitnesse Testing Framework Fitnesse Testing Framework
Fitnesse Testing Framework
Ajit Koti
 
ETL Validator Usecase - Checking for Duplicates
ETL Validator Usecase - Checking for DuplicatesETL Validator Usecase - Checking for Duplicates
ETL Validator Usecase - Checking for Duplicates
Datagaps Inc
 
Test Cases Vs Test Scenarios
Test Cases Vs Test ScenariosTest Cases Vs Test Scenarios
Test Cases Vs Test Scenarios
Sneha Singh
 
Writing Acceptance Tests Using Fitnesse
Writing Acceptance Tests Using FitnesseWriting Acceptance Tests Using Fitnesse
Writing Acceptance Tests Using Fitnesse
Facundo Farias
 
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
 
ETL Validator Usecase -Metadata Comparison
ETL Validator Usecase -Metadata ComparisonETL Validator Usecase -Metadata Comparison
ETL Validator Usecase -Metadata Comparison
Vasavi Chinta
 
Testcase definition
Testcase definitionTestcase definition
Testcase definition
Oana Feidi
 
Model builder in ARC GIS
Model builder in ARC GISModel builder in ARC GIS
Model builder in ARC GIS
KU Leuven
 

What's hot (20)

ETL Validator Usecase - Input/Output Fields Comparison
ETL Validator Usecase - Input/Output Fields ComparisonETL Validator Usecase - Input/Output Fields Comparison
ETL Validator Usecase - Input/Output Fields Comparison
 
Unit testing and junit
Unit testing and junitUnit testing and junit
Unit testing and junit
 
Tutorial 6 how to edit the causal factors in stpa project
Tutorial 6 how to edit the causal factors in stpa projectTutorial 6 how to edit the causal factors in stpa project
Tutorial 6 how to edit the causal factors in stpa project
 
1126640 question
1126640 question 1126640 question
1126640 question
 
Coverage analysis with "coverage"
Coverage analysis with "coverage"Coverage analysis with "coverage"
Coverage analysis with "coverage"
 
ETL Validator Usecase - Data Profiling and Comparison
ETL Validator Usecase - Data Profiling and ComparisonETL Validator Usecase - Data Profiling and Comparison
ETL Validator Usecase - Data Profiling and Comparison
 
Query parameterization in ETL Validator
Query parameterization in ETL ValidatorQuery parameterization in ETL Validator
Query parameterization in ETL Validator
 
Getting from PsycINFO to an Unpublished Test
Getting from PsycINFO to an Unpublished TestGetting from PsycINFO to an Unpublished Test
Getting from PsycINFO to an Unpublished Test
 
Peering into the white box: A testers approach to Code Reviews
Peering into the white box: A testers approach to Code ReviewsPeering into the white box: A testers approach to Code Reviews
Peering into the white box: A testers approach to Code Reviews
 
FitNesse, An Introduction
FitNesse, An IntroductionFitNesse, An Introduction
FitNesse, An Introduction
 
BI-Validator Usecase - Stress Test Plan
BI-Validator Usecase - Stress Test PlanBI-Validator Usecase - Stress Test Plan
BI-Validator Usecase - Stress Test Plan
 
ETL Validator Usecase - Transformation logic in input data source
ETL Validator Usecase - Transformation logic in input data sourceETL Validator Usecase - Transformation logic in input data source
ETL Validator Usecase - Transformation logic in input data source
 
Fitnesse Testing Framework
Fitnesse Testing Framework Fitnesse Testing Framework
Fitnesse Testing Framework
 
ETL Validator Usecase - Checking for Duplicates
ETL Validator Usecase - Checking for DuplicatesETL Validator Usecase - Checking for Duplicates
ETL Validator Usecase - Checking for Duplicates
 
Test Cases Vs Test Scenarios
Test Cases Vs Test ScenariosTest Cases Vs Test Scenarios
Test Cases Vs Test Scenarios
 
Writing Acceptance Tests Using Fitnesse
Writing Acceptance Tests Using FitnesseWriting Acceptance Tests Using Fitnesse
Writing Acceptance Tests Using Fitnesse
 
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
 
ETL Validator Usecase -Metadata Comparison
ETL Validator Usecase -Metadata ComparisonETL Validator Usecase -Metadata Comparison
ETL Validator Usecase -Metadata Comparison
 
Testcase definition
Testcase definitionTestcase definition
Testcase definition
 
Model builder in ARC GIS
Model builder in ARC GISModel builder in ARC GIS
Model builder in ARC GIS
 

Similar to Vs c# lecture6

C Language (All Concept)
C Language (All Concept)C Language (All Concept)
C Language (All Concept)
sachindane
 
C programming
C programmingC programming
C programming
PralhadKhanal1
 
C++ Tutorial
C++ TutorialC++ Tutorial
C++ Tutorial
freema48
 
Diving into VS 2015 Day5
Diving into VS 2015 Day5Diving into VS 2015 Day5
Diving into VS 2015 Day5
Akhil Mittal
 
C# ProgrammingInstructions are as follows.I need to use the Cons.pdf
C# ProgrammingInstructions are as follows.I need to use the Cons.pdfC# ProgrammingInstructions are as follows.I need to use the Cons.pdf
C# ProgrammingInstructions are as follows.I need to use the Cons.pdf
faxteldelhi
 
Ppt lesson 08
Ppt lesson 08Ppt lesson 08
Ppt lesson 08
Linda Bodrie
 
Lesson 5 .1 selection structure
Lesson 5 .1 selection structureLesson 5 .1 selection structure
Lesson 5 .1 selection structure
MLG College of Learning, Inc
 
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISPMCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
Ali Shah
 
CP c++ programing project Unit 1 intro.pdf
CP c++ programing project  Unit 1 intro.pdfCP c++ programing project  Unit 1 intro.pdf
CP c++ programing project Unit 1 intro.pdf
ShivamYadav886008
 
C++ programming language basic to advance level
C++ programming language basic to advance levelC++ programming language basic to advance level
C++ programming language basic to advance level
sajjad ali khan
 
COM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxCOM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptx
AnasYunusa
 
Chapter3: fundamental programming
Chapter3: fundamental programmingChapter3: fundamental programming
Chapter3: fundamental programming
Ngeam Soly
 
Ax 2012 x++ code best practices
Ax 2012 x++ code best practicesAx 2012 x++ code best practices
Ax 2012 x++ code best practices
Saboor Ahmed
 
Automation with bpt methodology
Automation with bpt methodologyAutomation with bpt methodology
Automation with bpt methodology
Gopi Nath
 
C programming session6
C programming  session6C programming  session6
C programming session6
Keroles karam khalil
 
Unit-2.pptx
Unit-2.pptxUnit-2.pptx
Unit-2.pptx
sidhantkulkarni1
 
Fundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptxFundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptx
Vigneshkumar Ponnusamy
 
Programming-in-C
Programming-in-CProgramming-in-C
Programming-in-C
DrPrabakaranPerumal
 
Programming Fundamentals lecture 5
Programming Fundamentals lecture 5Programming Fundamentals lecture 5
Programming Fundamentals lecture 5
REHAN IJAZ
 
RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG
Greg.Helton
 

Similar to Vs c# lecture6 (20)

C Language (All Concept)
C Language (All Concept)C Language (All Concept)
C Language (All Concept)
 
C programming
C programmingC programming
C programming
 
C++ Tutorial
C++ TutorialC++ Tutorial
C++ Tutorial
 
Diving into VS 2015 Day5
Diving into VS 2015 Day5Diving into VS 2015 Day5
Diving into VS 2015 Day5
 
C# ProgrammingInstructions are as follows.I need to use the Cons.pdf
C# ProgrammingInstructions are as follows.I need to use the Cons.pdfC# ProgrammingInstructions are as follows.I need to use the Cons.pdf
C# ProgrammingInstructions are as follows.I need to use the Cons.pdf
 
Ppt lesson 08
Ppt lesson 08Ppt lesson 08
Ppt lesson 08
 
Lesson 5 .1 selection structure
Lesson 5 .1 selection structureLesson 5 .1 selection structure
Lesson 5 .1 selection structure
 
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISPMCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
 
CP c++ programing project Unit 1 intro.pdf
CP c++ programing project  Unit 1 intro.pdfCP c++ programing project  Unit 1 intro.pdf
CP c++ programing project Unit 1 intro.pdf
 
C++ programming language basic to advance level
C++ programming language basic to advance levelC++ programming language basic to advance level
C++ programming language basic to advance level
 
COM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxCOM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptx
 
Chapter3: fundamental programming
Chapter3: fundamental programmingChapter3: fundamental programming
Chapter3: fundamental programming
 
Ax 2012 x++ code best practices
Ax 2012 x++ code best practicesAx 2012 x++ code best practices
Ax 2012 x++ code best practices
 
Automation with bpt methodology
Automation with bpt methodologyAutomation with bpt methodology
Automation with bpt methodology
 
C programming session6
C programming  session6C programming  session6
C programming session6
 
Unit-2.pptx
Unit-2.pptxUnit-2.pptx
Unit-2.pptx
 
Fundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptxFundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptx
 
Programming-in-C
Programming-in-CProgramming-in-C
Programming-in-C
 
Programming Fundamentals lecture 5
Programming Fundamentals lecture 5Programming Fundamentals lecture 5
Programming Fundamentals lecture 5
 
RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG
 

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
 
Vp lecture 3 ararat
Vp lecture 3 araratVp lecture 3 ararat
Vp lecture 3 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
 

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
 
Vp lecture 3 ararat
Vp lecture 3 araratVp lecture 3 ararat
Vp lecture 3 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
 

Recently uploaded

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
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
UiPathCommunity
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
christinelarrosa
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
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
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
ScyllaDB
 
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
 
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
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
Mydbops
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 

Recently uploaded (20)

Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
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)
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
 
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...
 
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)
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 

Vs c# lecture6

  • 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. From the project menu in the C# menu bar • Click the Add References • Chose assemblies => Framework • Search for System.Speach in the framework list • Chose System.speech and click ok • Before adding the code we have to add ( ) to the beginning of the program.
  • 4. Example:- using system.speech to read (text to speech) what is written in the text box From the project menu in the C# menu bar • Add system.speech library • Add textbox or richtextbox • Add button
  • 5. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Speech.Synthesis; namespace WindowsFormsApplication20 { public partial class Form1 : Form { SpeechSynthesizer p = new SpeechSynthesizer(); public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { p.Speak(textBox1.Text); } } } Add using System.Speech. Synthesis;
  • 6. Voice button trackbar for increasing volume trackbar for increasing Speed Choosing Male And Female
  • 7. private void toolStripButton4_Click(object sender, EventArgs e) { SpeechSynthesizer sp = new SpeechSynthesizer(); sp.Volume = trackBar1.Value; sp.Rate = trackBar2.Value; if (comboBox1.Text=="Male") { sp.SelectVoiceByHints(VoiceGender.Male); } else { sp.SelectVoiceByHints(VoiceGender.Female); } sp.Speak(textBox1.Text); }