[ home / overboard ] [ soy / qa / raid / r ] [ craft ] [ int / pol ] [ a / an / asp / biz / mtv / r9k / tech / v / sude / x ] [ q / news / chive / rules / pass / bans / status ] [ wiki / booru / irc ]

A banner for soyjak.party

/soy/ - Soyjaks

Sojaks
Catalog
Email
Subject
Comment
File
Password (For file deletion.)

File: 600px-45722_-_SoyBooru.png.webp 📥︎ (12.69 KB, 600x592) ImgOps

 â„–15611163[Quote]

WE LEARN C#. Yesterday's lesson in LESSON2 text file

 â„–15611170[Quote]

File: SOYlearningC#LESSON2.txt 📥︎ (2.77 KB)

Lesson2

 â„–15611186[Quote]

Do you have lesson1

 â„–15611212[Quote]

File: SOY-C#learningLESSON1.txt 📥︎ (5.66 KB)


 â„–15611216[Quote]

>>15611186
In the future I'll splice the lessons into bigger lessons with better file design. Right now I keep these to remember where we stopped

 â„–15611497[Quote]

>Switch
It is a conditional operator that takes a value you code in (the expression), checks a list of values it has (cases) and performs an action whose case value matches the expression value
^Example:
switch (expression)
{
case value1;
Insert code here;
break;

case value2;
insert another code here;
break
}
^Example end
You can code in as many cases as you need

 â„–15611514[Quote]

>>15611497
Forgot the ; after the second break. Don't forget your ;

 â„–15611609[Quote]

>>15611497
>switch default
switch has another function besides the cases - default. Default is basically a case without a set value, i.e. so if the expression doesn't match any case value, then switch will perform the default action
^Example
switch (expression)
{
case value1;
insert code here;
break;

default;
shit nophono codes fam about;
break;
}
So, if the expression = value1, them switch performs whathever code there is in that case. However, if expression doesn't match value1, sice there are no more cases with specific values to match, them switch performs shit nophono codes fam about

 â„–15611633[Quote]

>>15611163 (OP)
C# is aryan, im down.

 â„–15611725[Quote]

>>15611609
>multi-case actions
Another switch function is being able to code a single action to several cases
^Example
switch (expression)
{
case value1;
case value2;
Code;
break;
}
In this case, if expression is equal either to value1 or value2, switch will perform the code because both these cases possess that code

 â„–15611912[Quote]

>while
It is a loop that allows the program to execute an action as long as a specific condition is met
^example
while (condition)
{
code;
}

 â„–15612035[Quote]

>do while
It is a loop that first does an action and then checks the condition after the action is done. Therefore, this loop will act at least once guaranteed, unlike regual while that needs the condition met before acting
^example
do
{
Code;
} while (condition)

 â„–15612051[Quote]

>>15612035
don't forget the ; after while()

 â„–15612239[Quote]

Ok I'm tired, see you around

 â„–15612334[Quote]

Skit literally not evvn Nobaldi cares fan abak

 â„–15612396[Quote]


 â„–15612560[Quote]


Are you interested in c# lessons?



[Return][Catalog][Go to top][Post a Reply]
Delete Post [ ]
[ home / overboard ] [ soy / qa / raid / r ] [ craft ] [ int / pol ] [ a / an / asp / biz / mtv / r9k / tech / v / sude / x ] [ q / news / chive / rules / pass / bans / status ] [ wiki / booru / irc ]