SlideShare a Scribd company logo
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
1
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
2
Table of Contents
1.Design environment... 5
2.Visual Studio 2012 ..........................................................................................6
3.Character constants ...............................................................................................9
Example.......................................................................................................................9
4.Arithmetic Operators 10
Example.....................................................................................................................10
5.Variables 11
6.Code 12
6.Log in 13
7.Code 13
8.Code 16
9.Exercise 17
10.References (APA) 18
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
3
Table of Figure
Figure 1 -1 Visual Studio 2010..........................................................................................5
Figure 1 -2 New project..................................................................................................5
Figure 1 -3 windows from...............................................................................................6
Figure 1 -4 Toolbox........................................................................................................7
Figure 1 -5 properties ....................................................................................................8
Figure 0 -1 APPmVP6 ...................................................................................................12
Figure 0 -1 Log in.........................................................................................................13
Figure 0-1 New window...............................................................................................14
Figure 0 -2 window Name ............................................................................................15
Figure 0 -3 widow C# ..................................................................................................15
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
4
Design environment
Variables
Simple program of C#
Character constants
Arithmetic Operators
Exerciser
Define the Primitive Tool box and properties of visual studio.
list the types of data and how to use
list the types of Tool box and properties and how to use.
Create a micro program of C#.
Analysis the code of C#.
Objective of this chapter student will be able to:
Lesson Content:
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
5
1.Design environment
Start a subscription from Visual Studio 2012 or Visual Studio2010. Go to the File
menu and choose New Project
(Visual Studio2010)
This window will also allow you to change the name of the program and
Figure1-1Visual Studio 2010
Figure 1-2 New project
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
6
the path to save it, and then press OK
2.Visual Studio 2012
Figure 1-3 windows from
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
7
After pressing OK, the following window will appear for the first project
Window (1:)
The tools that include the Clear wares are called the two
programs
Figure 1-4 Toolbox
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
8
Window 2
Which will put in place the tools needed to build the project as well as
possible.
Figure 1-5 properties
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
9
3.Character constants
Character literals are included in single quotes. For example, 'x' can be
stored in a simple variable of char type. A literal character can be a
regular character (such as 'x'), an escape sequence (such as ' t'), or a
generic character (such as ' u02C0'). There are some characters in C #
when preceded by a backslash. They have a special meaning and are
used to represent such as the new font ( n) or the tab ( t). The
following is a list of some of these escape sequence codes:
Escape sequence Meaning
  character
' ' character
" " character
? ? character
a Alert or bell
b Backspace
f Form feed
n Newline
r Carriage return
t Horizontal tab
Table 0-1 Character literals
// private void button1_Click(object sender, EventArgs e)
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
10
4.Arithmetic Operators
Following table shows all the arithmetic operators supported by C#.
Assume variable A holds 10 and variable B holds 20 then:
Operator Description Example
+ Adds two operands A + B = 30
- Subtracts second operand from the first A - B = -10
* Multiplies both operands A * B = 200
/ Divides numerator by de-numerator B / A = 2
% Modulus Operator and remainder of after an integer
division
B % A = 0
++ Increment operator increases integer value by one A++ = 11
-- Decrement operator decreases integer value by one A-- = 9
Table 0-1 Arithmetic Operators
Example
x = int.Parse(textBox1.Text);
y = int.Parse(textBox2.Text);
r = x * y;
textBox3.Text = r.ToString();
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
11
5.Variables
Program (1) A new project was established
File -> New -> Project
1- Button:
Name: button1 Text: ok
2- Button:
Name: button2 Text: Close
1- textBox1:
Name: Name. Text
2- textBox1:
Name: phone. Text
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
12
1- Label1:
For = Name
Name: Name. Text
Text: Name
2- Label2:
For = phone
Text: phone.
6.Code
Double-click on button ok Then write the code inside the button
Double-click on button Close Then write the code inside the button
MessageBox.Show(" Name =" + Name. Text + " phone =" + phone. Text);
Close ();
Figure 0-1 APPmVP6
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
13
6.Log in
1- Button:
Name: button1 Text: ok
2- Button:
Name: button2 Text:
Close
1- textBox1:
Name: User Name
2- textBox1:
Name: password
7.Code
Double-click on button ok Then write the code inside the button
Figure 0-1 Log in
if (textBox1.Text == "123" && textBox2.Text == "123")
{
window sig = new window();
sig.Show();
}
else
{
MessageBox.Show("Please Check your username or password");
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
14
Double-click on button Close Then write the code inside the button
Figure 0-1 New window
New window was created
windows forma Application > ADD> window form
Close ();
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
15
Window Name > ADD
*You can add any name
1- linkLabel1:
Name: C#
Link:
http://www.ttcollege.edu.sa/
-2 pictureBox1
Figure0-2 window Name
Figure 0-3 widow C#
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
16
8.Code
Double-click on linkLabel1 Then write the code inside the linkLabel1
System.Diagnostics.Process.Start("http://www.ttcollege.edu.sa/");
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
17
9.Exercise
1- Create a new project in visual studio and demonstrate the use of menu strips, menu bars,
context menus, and status bar.
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
2- Create a new project in visual studio and demonstrate the program
that collects two numbers.
………………………………………………………………………………………………………………
………………………………………………………………………………………………………………
Chapter 2Unit: 1 C# language componentsBasics of C# Programming
18
10.References (APA)
Hejlsberg, A., Torgersen, M., Wiltamuth, S., & Golde, P. (2010). C# Programming language.
Addison-Wesley Professional.
Obasanjo, D. (2002). A comparison of Microsoft’s C# programming language to Sun
Microsystem’s Java programming language.
Marshall, D. (2005). Programming Microsoft Visual C# 2005 Core Reference. Microsoft Press.

More Related Content

What's hot

Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market Billing
Harsh Kumar
 
C# Tutorial MSM_Murach chapter-23-slides
C# Tutorial MSM_Murach chapter-23-slidesC# Tutorial MSM_Murach chapter-23-slides
C# Tutorial MSM_Murach chapter-23-slides
Sami Mut
 
C# Tutorial MSM_Murach chapter-24-slides
C# Tutorial MSM_Murach chapter-24-slidesC# Tutorial MSM_Murach chapter-24-slides
C# Tutorial MSM_Murach chapter-24-slides
Sami Mut
 
Oops Quiz
Oops QuizOops Quiz
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMINGFINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMINGAmira Dolce Farhana
 
C# Tutorial MSM_Murach chapter-05-slides
C# Tutorial MSM_Murach chapter-05-slidesC# Tutorial MSM_Murach chapter-05-slides
C# Tutorial MSM_Murach chapter-05-slides
Sami Mut
 
C# Tutorial MSM_Murach chapter-12-slides
C# Tutorial MSM_Murach chapter-12-slidesC# Tutorial MSM_Murach chapter-12-slides
C# Tutorial MSM_Murach chapter-12-slides
Sami Mut
 
C# Tutorial MSM_Murach chapter-09-slides
C# Tutorial MSM_Murach chapter-09-slidesC# Tutorial MSM_Murach chapter-09-slides
C# Tutorial MSM_Murach chapter-09-slides
Sami Mut
 
C# Tutorial MSM_Murach chapter-07-slides
C# Tutorial MSM_Murach chapter-07-slidesC# Tutorial MSM_Murach chapter-07-slides
C# Tutorial MSM_Murach chapter-07-slides
Sami Mut
 
C# Tutorial MSM_Murach chapter-25-slides
C# Tutorial MSM_Murach chapter-25-slidesC# Tutorial MSM_Murach chapter-25-slides
C# Tutorial MSM_Murach chapter-25-slides
Sami Mut
 
Intake 38 8
Intake 38 8Intake 38 8
Intake 38 8
Mahmoud Ouf
 
C# Tutorial MSM_Murach chapter-20-slides
C# Tutorial MSM_Murach chapter-20-slidesC# Tutorial MSM_Murach chapter-20-slides
C# Tutorial MSM_Murach chapter-20-slides
Sami Mut
 
C# Tutorial MSM_Murach chapter-03-slides
C# Tutorial MSM_Murach chapter-03-slidesC# Tutorial MSM_Murach chapter-03-slides
C# Tutorial MSM_Murach chapter-03-slides
Sami Mut
 
C# Tutorial MSM_Murach chapter-08-slides
C# Tutorial MSM_Murach chapter-08-slidesC# Tutorial MSM_Murach chapter-08-slides
C# Tutorial MSM_Murach chapter-08-slides
Sami Mut
 
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paperInformatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Harish Gyanani
 
C# Tutorial MSM_Murach chapter-06-slides
C# Tutorial MSM_Murach chapter-06-slidesC# Tutorial MSM_Murach chapter-06-slides
C# Tutorial MSM_Murach chapter-06-slides
Sami Mut
 
FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013
Syahriha Ruslan
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
Mohammed Saleh
 
C# Tutorial MSM_Murach chapter-04-slides
C# Tutorial MSM_Murach chapter-04-slidesC# Tutorial MSM_Murach chapter-04-slides
C# Tutorial MSM_Murach chapter-04-slides
Sami Mut
 

What's hot (20)

Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market Billing
 
C# Tutorial MSM_Murach chapter-23-slides
C# Tutorial MSM_Murach chapter-23-slidesC# Tutorial MSM_Murach chapter-23-slides
C# Tutorial MSM_Murach chapter-23-slides
 
C# Tutorial MSM_Murach chapter-24-slides
C# Tutorial MSM_Murach chapter-24-slidesC# Tutorial MSM_Murach chapter-24-slides
C# Tutorial MSM_Murach chapter-24-slides
 
Oops Quiz
Oops QuizOops Quiz
Oops Quiz
 
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMINGFINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
 
C# Tutorial MSM_Murach chapter-05-slides
C# Tutorial MSM_Murach chapter-05-slidesC# Tutorial MSM_Murach chapter-05-slides
C# Tutorial MSM_Murach chapter-05-slides
 
C# Tutorial MSM_Murach chapter-12-slides
C# Tutorial MSM_Murach chapter-12-slidesC# Tutorial MSM_Murach chapter-12-slides
C# Tutorial MSM_Murach chapter-12-slides
 
C# Tutorial MSM_Murach chapter-09-slides
C# Tutorial MSM_Murach chapter-09-slidesC# Tutorial MSM_Murach chapter-09-slides
C# Tutorial MSM_Murach chapter-09-slides
 
C# Tutorial MSM_Murach chapter-07-slides
C# Tutorial MSM_Murach chapter-07-slidesC# Tutorial MSM_Murach chapter-07-slides
C# Tutorial MSM_Murach chapter-07-slides
 
C# Tutorial MSM_Murach chapter-25-slides
C# Tutorial MSM_Murach chapter-25-slidesC# Tutorial MSM_Murach chapter-25-slides
C# Tutorial MSM_Murach chapter-25-slides
 
Intake 38 8
Intake 38 8Intake 38 8
Intake 38 8
 
C# Tutorial MSM_Murach chapter-20-slides
C# Tutorial MSM_Murach chapter-20-slidesC# Tutorial MSM_Murach chapter-20-slides
C# Tutorial MSM_Murach chapter-20-slides
 
C# Tutorial MSM_Murach chapter-03-slides
C# Tutorial MSM_Murach chapter-03-slidesC# Tutorial MSM_Murach chapter-03-slides
C# Tutorial MSM_Murach chapter-03-slides
 
C# Tutorial MSM_Murach chapter-08-slides
C# Tutorial MSM_Murach chapter-08-slidesC# Tutorial MSM_Murach chapter-08-slides
C# Tutorial MSM_Murach chapter-08-slides
 
2621008 - C++ 1
2621008 -  C++ 12621008 -  C++ 1
2621008 - C++ 1
 
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paperInformatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
 
C# Tutorial MSM_Murach chapter-06-slides
C# Tutorial MSM_Murach chapter-06-slidesC# Tutorial MSM_Murach chapter-06-slides
C# Tutorial MSM_Murach chapter-06-slides
 
FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
C# Tutorial MSM_Murach chapter-04-slides
C# Tutorial MSM_Murach chapter-04-slidesC# Tutorial MSM_Murach chapter-04-slides
C# Tutorial MSM_Murach chapter-04-slides
 

Similar to Content

Vbtutorial
VbtutorialVbtutorial
Vbtutorialdhi her
 
Experiment_1.pdf
Experiment_1.pdfExperiment_1.pdf
Experiment_1.pdf
musa572502
 
Vb tutorial
Vb tutorialVb tutorial
Vb tutorialjayguyab
 
PT1420 File Access and Visual Basic .docx
PT1420 File Access and Visual Basic                      .docxPT1420 File Access and Visual Basic                      .docx
PT1420 File Access and Visual Basic .docx
amrit47
 
CODING-DAY-2-INTRODUCTION TO C PROGRAMMING.ppt
CODING-DAY-2-INTRODUCTION TO C PROGRAMMING.pptCODING-DAY-2-INTRODUCTION TO C PROGRAMMING.ppt
CODING-DAY-2-INTRODUCTION TO C PROGRAMMING.ppt
adamjackson818417
 
Programming with c language practical manual
Programming with c language practical manualProgramming with c language practical manual
Programming with c language practical manual
Anil Bishnoi
 
C programming languag for cse students
C programming languag for cse studentsC programming languag for cse students
C programming languag for cse students
Abdur Rahim
 
Software engineering modeling lab lectures
Software engineering modeling lab lecturesSoftware engineering modeling lab lectures
Software engineering modeling lab lectures
marwaeng
 
Ch2 introduction to c
Ch2 introduction to cCh2 introduction to c
Ch2 introduction to cHattori Sidek
 
C++ Overview
C++ OverviewC++ Overview
C++ Overviewkelleyc3
 
2.Overview of C language.pptx
2.Overview of C language.pptx2.Overview of C language.pptx
2.Overview of C language.pptx
Vishwas459764
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 sol
IIUM
 
C programming session 01
C programming session 01C programming session 01
C programming session 01Vivek Singh
 
Vb6.0 intro
Vb6.0 introVb6.0 intro
Vb6.0 intro
JOSEPHINEA6
 
cpp-streams.ppt,C++ is the top choice of many programmers for creating powerf...
cpp-streams.ppt,C++ is the top choice of many programmers for creating powerf...cpp-streams.ppt,C++ is the top choice of many programmers for creating powerf...
cpp-streams.ppt,C++ is the top choice of many programmers for creating powerf...
bhargavi804095
 
Intro cpp
Intro cppIntro cpp
Intro cpp
hamza239523
 
Adapted from Harris & Harris Digital Design and Computer Arch.docx
Adapted from Harris & Harris Digital Design and Computer Arch.docxAdapted from Harris & Harris Digital Design and Computer Arch.docx
Adapted from Harris & Harris Digital Design and Computer Arch.docx
nettletondevon
 
Chapter03_PPT.ppt
Chapter03_PPT.pptChapter03_PPT.ppt
Chapter03_PPT.ppt
DrRajeswari5
 

Similar to Content (20)

Vbtutorial
VbtutorialVbtutorial
Vbtutorial
 
Experiment_1.pdf
Experiment_1.pdfExperiment_1.pdf
Experiment_1.pdf
 
Vb tutorial
Vb tutorialVb tutorial
Vb tutorial
 
Vb tutorial
Vb tutorialVb tutorial
Vb tutorial
 
PT1420 File Access and Visual Basic .docx
PT1420 File Access and Visual Basic                      .docxPT1420 File Access and Visual Basic                      .docx
PT1420 File Access and Visual Basic .docx
 
CODING-DAY-2-INTRODUCTION TO C PROGRAMMING.ppt
CODING-DAY-2-INTRODUCTION TO C PROGRAMMING.pptCODING-DAY-2-INTRODUCTION TO C PROGRAMMING.ppt
CODING-DAY-2-INTRODUCTION TO C PROGRAMMING.ppt
 
Programming with c language practical manual
Programming with c language practical manualProgramming with c language practical manual
Programming with c language practical manual
 
C programming languag for cse students
C programming languag for cse studentsC programming languag for cse students
C programming languag for cse students
 
Software engineering modeling lab lectures
Software engineering modeling lab lecturesSoftware engineering modeling lab lectures
Software engineering modeling lab lectures
 
Ch2 introduction to c
Ch2 introduction to cCh2 introduction to c
Ch2 introduction to c
 
C++ Overview
C++ OverviewC++ Overview
C++ Overview
 
2.Overview of C language.pptx
2.Overview of C language.pptx2.Overview of C language.pptx
2.Overview of C language.pptx
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 sol
 
C programming session 01
C programming session 01C programming session 01
C programming session 01
 
Vb6.0 intro
Vb6.0 introVb6.0 intro
Vb6.0 intro
 
cpp-streams.ppt,C++ is the top choice of many programmers for creating powerf...
cpp-streams.ppt,C++ is the top choice of many programmers for creating powerf...cpp-streams.ppt,C++ is the top choice of many programmers for creating powerf...
cpp-streams.ppt,C++ is the top choice of many programmers for creating powerf...
 
Intro cpp
Intro cppIntro cpp
Intro cpp
 
Adapted from Harris & Harris Digital Design and Computer Arch.docx
Adapted from Harris & Harris Digital Design and Computer Arch.docxAdapted from Harris & Harris Digital Design and Computer Arch.docx
Adapted from Harris & Harris Digital Design and Computer Arch.docx
 
Chapter03_PPT.ppt
Chapter03_PPT.pptChapter03_PPT.ppt
Chapter03_PPT.ppt
 
OVERVIEW OF ‘C’ PROGRAM
OVERVIEW OF ‘C’ PROGRAMOVERVIEW OF ‘C’ PROGRAM
OVERVIEW OF ‘C’ PROGRAM
 

More from o3aroo

Robert mills gani
Robert mills ganiRobert mills gani
Robert mills gani
o3aroo
 
Unit 4
Unit 4  Unit 4
Unit 4
o3aroo
 
Survey results
Survey resultsSurvey results
Survey results
o3aroo
 
Classroom management (1)
Classroom management  (1)Classroom management  (1)
Classroom management (1)
o3aroo
 
Differentiation
DifferentiationDifferentiation
Differentiation
o3aroo
 
C# programming language
C# programming languageC# programming language
C# programming language
o3aroo
 

More from o3aroo (6)

Robert mills gani
Robert mills ganiRobert mills gani
Robert mills gani
 
Unit 4
Unit 4  Unit 4
Unit 4
 
Survey results
Survey resultsSurvey results
Survey results
 
Classroom management (1)
Classroom management  (1)Classroom management  (1)
Classroom management (1)
 
Differentiation
DifferentiationDifferentiation
Differentiation
 
C# programming language
C# programming languageC# programming language
C# programming language
 

Recently uploaded

A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 

Recently uploaded (20)

A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 

Content

  • 1.
  • 2. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 1
  • 3. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 2 Table of Contents 1.Design environment... 5 2.Visual Studio 2012 ..........................................................................................6 3.Character constants ...............................................................................................9 Example.......................................................................................................................9 4.Arithmetic Operators 10 Example.....................................................................................................................10 5.Variables 11 6.Code 12 6.Log in 13 7.Code 13 8.Code 16 9.Exercise 17 10.References (APA) 18
  • 4. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 3 Table of Figure Figure 1 -1 Visual Studio 2010..........................................................................................5 Figure 1 -2 New project..................................................................................................5 Figure 1 -3 windows from...............................................................................................6 Figure 1 -4 Toolbox........................................................................................................7 Figure 1 -5 properties ....................................................................................................8 Figure 0 -1 APPmVP6 ...................................................................................................12 Figure 0 -1 Log in.........................................................................................................13 Figure 0-1 New window...............................................................................................14 Figure 0 -2 window Name ............................................................................................15 Figure 0 -3 widow C# ..................................................................................................15
  • 5. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 4 Design environment Variables Simple program of C# Character constants Arithmetic Operators Exerciser Define the Primitive Tool box and properties of visual studio. list the types of data and how to use list the types of Tool box and properties and how to use. Create a micro program of C#. Analysis the code of C#. Objective of this chapter student will be able to: Lesson Content:
  • 6. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 5 1.Design environment Start a subscription from Visual Studio 2012 or Visual Studio2010. Go to the File menu and choose New Project (Visual Studio2010) This window will also allow you to change the name of the program and Figure1-1Visual Studio 2010 Figure 1-2 New project
  • 7. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 6 the path to save it, and then press OK 2.Visual Studio 2012 Figure 1-3 windows from
  • 8. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 7 After pressing OK, the following window will appear for the first project Window (1:) The tools that include the Clear wares are called the two programs Figure 1-4 Toolbox
  • 9. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 8 Window 2 Which will put in place the tools needed to build the project as well as possible. Figure 1-5 properties
  • 10. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 9 3.Character constants Character literals are included in single quotes. For example, 'x' can be stored in a simple variable of char type. A literal character can be a regular character (such as 'x'), an escape sequence (such as ' t'), or a generic character (such as ' u02C0'). There are some characters in C # when preceded by a backslash. They have a special meaning and are used to represent such as the new font ( n) or the tab ( t). The following is a list of some of these escape sequence codes: Escape sequence Meaning character ' ' character " " character ? ? character a Alert or bell b Backspace f Form feed n Newline r Carriage return t Horizontal tab Table 0-1 Character literals // private void button1_Click(object sender, EventArgs e)
  • 11. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 10 4.Arithmetic Operators Following table shows all the arithmetic operators supported by C#. Assume variable A holds 10 and variable B holds 20 then: Operator Description Example + Adds two operands A + B = 30 - Subtracts second operand from the first A - B = -10 * Multiplies both operands A * B = 200 / Divides numerator by de-numerator B / A = 2 % Modulus Operator and remainder of after an integer division B % A = 0 ++ Increment operator increases integer value by one A++ = 11 -- Decrement operator decreases integer value by one A-- = 9 Table 0-1 Arithmetic Operators Example x = int.Parse(textBox1.Text); y = int.Parse(textBox2.Text); r = x * y; textBox3.Text = r.ToString();
  • 12. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 11 5.Variables Program (1) A new project was established File -> New -> Project 1- Button: Name: button1 Text: ok 2- Button: Name: button2 Text: Close 1- textBox1: Name: Name. Text 2- textBox1: Name: phone. Text
  • 13. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 12 1- Label1: For = Name Name: Name. Text Text: Name 2- Label2: For = phone Text: phone. 6.Code Double-click on button ok Then write the code inside the button Double-click on button Close Then write the code inside the button MessageBox.Show(" Name =" + Name. Text + " phone =" + phone. Text); Close (); Figure 0-1 APPmVP6
  • 14. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 13 6.Log in 1- Button: Name: button1 Text: ok 2- Button: Name: button2 Text: Close 1- textBox1: Name: User Name 2- textBox1: Name: password 7.Code Double-click on button ok Then write the code inside the button Figure 0-1 Log in if (textBox1.Text == "123" && textBox2.Text == "123") { window sig = new window(); sig.Show(); } else { MessageBox.Show("Please Check your username or password");
  • 15. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 14 Double-click on button Close Then write the code inside the button Figure 0-1 New window New window was created windows forma Application > ADD> window form Close ();
  • 16. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 15 Window Name > ADD *You can add any name 1- linkLabel1: Name: C# Link: http://www.ttcollege.edu.sa/ -2 pictureBox1 Figure0-2 window Name Figure 0-3 widow C#
  • 17. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 16 8.Code Double-click on linkLabel1 Then write the code inside the linkLabel1 System.Diagnostics.Process.Start("http://www.ttcollege.edu.sa/");
  • 18. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 17 9.Exercise 1- Create a new project in visual studio and demonstrate the use of menu strips, menu bars, context menus, and status bar. ……………………………………………………………………………………………………………… ……………………………………………………………………………………………………………… 2- Create a new project in visual studio and demonstrate the program that collects two numbers. ……………………………………………………………………………………………………………… ………………………………………………………………………………………………………………
  • 19. Chapter 2Unit: 1 C# language componentsBasics of C# Programming 18 10.References (APA) Hejlsberg, A., Torgersen, M., Wiltamuth, S., & Golde, P. (2010). C# Programming language. Addison-Wesley Professional. Obasanjo, D. (2002). A comparison of Microsoft’s C# programming language to Sun Microsystem’s Java programming language. Marshall, D. (2005). Programming Microsoft Visual C# 2005 Core Reference. Microsoft Press.