[go: up one dir, main page]

0% found this document useful (0 votes)
20 views17 pages

Introduction To C

C# is a popular programming language developed by Microsoft that operates on the .NET Framework, suitable for various applications including games and web development. The document covers essential concepts such as coding, variables, data types, and the use of an IDE like Visual Studio for C# development. It also includes a quiz to reinforce understanding of the material presented.

Uploaded by

Joem Oliquino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views17 pages

Introduction To C

C# is a popular programming language developed by Microsoft that operates on the .NET Framework, suitable for various applications including games and web development. The document covers essential concepts such as coding, variables, data types, and the use of an IDE like Visual Studio for C# development. It also includes a quiz to reinforce understanding of the material presented.

Uploaded by

Joem Oliquino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Introduction to C#

C#

 C# (C-Sharp) is a programming language developed by Microsoft


that runs on the .NET Framework.
 (Pronounced as See-Sharp) is one of the most popular modern
programming languages.
 You can use it to create video games, web, mobile, database
application, and much, much more.
.NET Framework

 The .NET Framework is a proprietary software framework


developed by Microsoft that runs primarily on Microsoft Windows.
C# IDE

 The easiest way to get started with C#, is to use an IDE.


 An IDE (Integrated Development Environment) is used to edit and
compile code.
 We will use Visual Studio Community, which is free to download
from https://visualstudio.microsoft.com/vs/community/.
 Applications written in C# use the .NET Framework, so it makes
sense to use Visual Studio, as the program, the framework, and
the language, are all created by Microsoft.
Coding

 the process or activity of writing computer programs.


 Human use computer programs to communicate with machines.
Without computer programs, we wouldn’t have smartphones,
websites, or even exploration in outer space.
Output

 Most computer programs are designed to produces outputs.


Examples of outputs are:
 “You’ve got a new message” notifications
 “Game Over” displayed on the screen when playing video games
 Your account balance when checking your online banking app.
Output

 Coders use outputs all the time to check that the computer is
following the given instruction and fix problems with code. The
following line of code displays a message on the screen as an
output
The Code

 Console.WriteLine();
Used to display something in the console.

Console.WriteLine(“Hello World”);
The Code

 Console.Write();
Used to display something in the console on the same line.

Console.Write(“Hello”);
Console.Write(“I am Batman”);
Variables

 Variables are used to store up temporary data to be used in our


program’s runtime
 Variables are used to store information to be referenced and
manipulated in a computer program.
Data Type

 The type of Data inside our variable


o Characters
o Strings
o Boolean
o Integers
o Float
Identifiers

 It is the name of the variable that the programmer indicated it is


used to read and Write inside the variable.
Rules of Identifiers

 You cannot use any special characters other than underscore (_).
 You cannot use whitespaces.
 You cannot use number alone.
 You cannot use numbers to be the first character of the identifier.
 You can use numbers but with letters.
Declaring variables.

Syntax
 datatype identifier;
 datatype identifier = value;
 datatype identifier1, identifier2,
 datatype identifier1 = value; identifier2 = value;
Concatenation

 The process of joining String together with plus operator.

String Name = “Batman”;

Console.WriteLine(“Hello!I’m “ + Name);
Sentence Builder Challenge

 Create a program that will only require the programmer to


change the variable values in order to create a dynamic sentence
using the sentence in the Sample Output.
 PS: Bold Words indicates a variable
 Sample Output:
Hi I am Batman!
I’am 24 Years Old!
My Strand is ICT!
My Semestral Average is 97.5
Quiz
True or False
1. C# (C-Sharp) is a programming language developed by Google that runs on the .NET
Framework.
2. An IDE (Integrating Develops Environmental) is used to edit and compile code.
3. Human use computer programs to communicate with aliens.
4. Coders use outputs all the time to check that the computer is following the given
instruction and fix problems with code.
5. Console.WriteLine is used display something in the console
6. Real computer programs can include thousands of lines of code.
7. Text needs to be enclosed in quotes
8. C# is not a case-sensitive language
9. Variables are used to store information to be referenced and manipulated in a
computer program.
10. Integer is a data type used for fractional numbers

You might also like