0% found this document useful (0 votes)
25 views12 pages

C# Beginners Guide (Middle School Audience)

beginners guide to C# :)

Uploaded by

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

C# Beginners Guide (Middle School Audience)

beginners guide to C# :)

Uploaded by

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

A beginners Guide To C#

by :John Yang
So, What is c#?

● Derived from c++ Made it


● Child of java and c ++

Things made in c#:

Etc..
The lessons contents

Variables and Loops Moving


operators forward

Manipulating Arrays
variables and
operators

Conditional Foreach
statements Loop
Variables
Int: a variable that stores singular digits with no
decimals

String : variable that contains texts

Char: a variable that can only store one letter

Double: a variable that stores digits with decimals.

Boolean: true or false value variable


Operators
Basically Self explanatory:
+ - / *

%: gives remanded of two numbers

++: iterates a +1

–: iterates a -1

+=: iterates any number you want


Manipulating variables and
operators
Console.WriteLine();

Console.ReadLine();
X represents a string
variable x.Length();

x.ToUpper/ToLower();

X[y];

x.indexof();
Conditional statements
If (condition){

Else doesn’t }else if(condition){


Need a condition
:D
}else{

}
Comparison operators
< less than
> mores than
<= less or equal to
>= more or equal to
== equals
!= not equals
Loops
for( variable = 0 ; condition; code that while (condition){
gets executed after every iteration; ){

} }
Arrays
//Arrays: data structure that represents
a list of objects

// how to declare an array


String [ ] things = new string[]{"x", "y",
"x", "x"};

//adding values to an array


You can input values into an array by
doing:
Foreach Loops
foreach(individual array in array)
{
Console.WriteLine(individual
array );
}
Moving forward

You might also like