Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
if (condition)
|
||||
{
|
||||
// Some Task
|
||||
}
|
||||
|
||||
if (condition)
|
||||
{
|
||||
// Some Task
|
||||
}
|
||||
else if (condition2)
|
||||
{
|
||||
// Some Task
|
||||
}
|
||||
else
|
||||
{
|
||||
// Some Task
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
// if condition is true var will be set to 1, else 2.
|
||||
int var = condition ? 1 : 2;
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
switch (value)
|
||||
{
|
||||
case 1:
|
||||
// Some task
|
||||
break; // Breaks are required in C#.
|
||||
case 2:
|
||||
case 3:
|
||||
// Some task
|
||||
break;
|
||||
default: // If no other case is matched.
|
||||
// Some task
|
||||
break;
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
switch (value)
|
||||
{
|
||||
case 1:
|
||||
// Some task
|
||||
goto case 2; // will cause the code indicated in case 2 to be executed.
|
||||
case 2:
|
||||
// Some task
|
||||
break;
|
||||
case 3:
|
||||
// Some task
|
||||
break;
|
||||
default: // If no other case is matched.
|
||||
// Some task
|
||||
break;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue